Skip to content

Commit

Permalink
feat: pub set_sandbox_genesis and fix test_manually_spawned_deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
fospring committed Jun 23, 2024
1 parent 480c1e8 commit 7a11a2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces/src/network/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn overwrite_genesis(home_dir: impl AsRef<Path>) -> Result<()> {
Ok(())
}

pub(crate) fn set_sandbox_genesis(home_dir: impl AsRef<Path>) -> Result<()> {
pub fn set_sandbox_genesis(home_dir: impl AsRef<Path>) -> Result<()> {
overwrite_genesis(&home_dir)?;
let registrar_key = r#"{"account_id":"registrar","public_key":"ed25519:5BGSaf6YjVm7565VzWQHNxoyEjwr3jUpRJSGjREvU9dB","private_key":"ed25519:3tgdk2wPraJzT4nsTuf86UX41xgPNk3MHnq8epARMdBNs29AFEztAuaQ7iHddDfXG9F2RzV1XNQYgJyAyoW51UBB"}"#;
let mut registrar_wallet = File::create(home_dir.as_ref().join("registrar.json"))
Expand Down
1 change: 1 addition & 0 deletions workspaces/src/network/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ pub use self::testnet::Testnet;
pub use self::variants::{
AllowDevAccountCreation, NetworkClient, NetworkInfo, TopLevelAccountCreator,
};
pub use config::set_sandbox_genesis;
1 change: 1 addition & 0 deletions workspaces/tests/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async fn test_manually_spawned_deploy() -> anyhow::Result<()> {
.await
.unwrap();
tracing::info!(target: "workspaces-test", "sandbox-init: {:?}", output);
near_workspaces::network::set_sandbox_genesis(&home_dir)?;

let mut child = near_sandbox_utils::run(&home_dir, rpc_port, net_port)?;

Expand Down

0 comments on commit 7a11a2e

Please sign in to comment.