-
Notifications
You must be signed in to change notification settings - Fork 4
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
refactor(tests): Spawn node for the tests #195
base: main
Are you sure you want to change the base?
Conversation
Rename to replay_back_and_updating
Conflicts: .github/workflows/ci.yml
Conflicts: gear-programs/erc20-relay/app/tests/gclient.rs
Conflicts: .github/workflows/ci.yml
Conflicts: .github/workflows/ci.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move these .json
and .zst
files to a new folder like tests/data
?
} | ||
|
||
#[ignore] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
async fn spin_up_node() -> (GClientRemoting, GearApi, CodeId, GasUnit) { | ||
static LOCK: Mutex<(u32, Option<CodeId>)> = Mutex::const_new((0, None)); | ||
|
||
async fn spin_up_node() -> (impl Remoting + Clone, GearApi, CodeId, GasUnit, [u8; 4]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async fn spin_up_node() -> (impl Remoting + Clone, GearApi, CodeId, GasUnit, [u8; 4]) { | |
async fn connect_to_node() -> (impl Remoting + Clone, GearApi, CodeId, GasUnit, [u8; 4]) { |
api, | ||
code_id, | ||
gas_limit, | ||
salt.to_le_bytes(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just generate random [u8; 32] for salt? As I see it will simplify code a lot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid we will need the mutex anyway since the first transaction of transferring funds from Alice to the account should be sent beforehand.
|
||
let bootstrap = beacon_client.get_bootstrap(&checkpoint_hex).await?; | ||
println!("bootstrap slot = {}", bootstrap.header.slot); | ||
async fn live_init_holesky() -> Result<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to go without these tests as they're anyway intended to use only for manual testing. If you need them I think they can be moved to /tools
(and don't expose endpoints, just read env vars)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Resolves #161
@gear-tech/dev