Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a basic test to run the oracle #26

Merged
merged 9 commits into from
Oct 29, 2024
Merged

Conversation

loocapro
Copy link
Contributor

@loocapro loocapro commented Oct 6, 2024

Added an e2e test that:

  1. spawns 2 oracles
  2. make them peer
  3. expects signed tick data

Depends on: #33

oracle/src/main.rs Outdated Show resolved Hide resolved
@loocapro loocapro force-pushed the e2e-tests branch 2 times, most recently from 5ba95b5 to 782a721 Compare October 26, 2024 16:56
@loocapro loocapro marked this pull request as ready for review October 26, 2024 16:56
@loocapro loocapro marked this pull request as draft October 26, 2024 17:07
@loocapro loocapro marked this pull request as ready for review October 26, 2024 18:20
Copy link
Contributor

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge main into this branch, so that the changes from Reth bump aren't visible anymore?

Copy link
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this lgtm

tysm @loocapro

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
oracle/Cargo.toml Show resolved Hide resolved
oracle/Cargo.toml Outdated Show resolved Hide resolved
Comment on lines +178 to +185
// expect signed data
let signed_ticker_1 = broadcast_stream_1.next().await.unwrap().unwrap();
assert_eq!(signed_ticker_1.ticker.symbol, "BTCUSDT");
assert_eq!(signed_ticker_1.signer, signer_1);

let signed_ticker_2 = broadcast_stream_2.next().await.unwrap().unwrap();
assert_eq!(signed_ticker_2.ticker.symbol, "BTCUSDT");
assert_eq!(signed_ticker_2.signer, signer_2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far this tests that both instances received an item from the stream, but it doesn't test if they actually exchange messages as peers after connecting. Can we do that as well?

Copy link
Contributor

@shekhirin shekhirin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#26 (comment) can be addressed in a separate PR, so LGTM as well! Thank you!

@shekhirin shekhirin merged commit 5af288e into paradigmxyz:main Oct 29, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants