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

fix: use docker.for.mac.localhost for macos #87

Merged
merged 1 commit into from
Apr 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion integration-tests/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ use workspaces::{network::Sandbox, AccountId, Worker};
mod docker;

const NETWORK: &str = "mpc_recovery_integration_test_network";
#[cfg(target_os = "linux")]
const HOST_MACHINE_FROM_DOCKER: &str = "172.17.0.1";
#[cfg(target_os = "macos")]
const HOST_MACHINE_FROM_DOCKER: &str = "docker.for.mac.localhost";

struct TestContext<'a> {
leader_node: &'a LeaderNode,
Expand Down Expand Up @@ -58,7 +62,7 @@ where
let (relayer_account_id, relayer_account_sk) = create_account(&worker).await?;
let (creator_account_id, creator_account_sk) = create_account(&worker).await?;

let near_rpc = format!("http://172.17.0.1:{}", worker.rpc_port());
let near_rpc = format!("http://{HOST_MACHINE_FROM_DOCKER}:{}", worker.rpc_port());
let redis = Redis::start(&docker, NETWORK).await?;
let relayer = Relayer::start(
&docker,
Expand Down