From 83b292383fff1cd70a9c7d7dfdcfe3112b003717 Mon Sep 17 00:00:00 2001 From: tomyrd Date: Wed, 29 Jan 2025 12:24:12 -0300 Subject: [PATCH] remove duplicated config file --- bin/miden-cli/config/miden-client-rpc.toml | 7 ------- tests/integration/common.rs | 7 ++----- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 bin/miden-cli/config/miden-client-rpc.toml diff --git a/bin/miden-cli/config/miden-client-rpc.toml b/bin/miden-cli/config/miden-client-rpc.toml deleted file mode 100644 index 33f6e35f2..000000000 --- a/bin/miden-cli/config/miden-client-rpc.toml +++ /dev/null @@ -1,7 +0,0 @@ -## USAGE: -## ================================================================================================ -# - endpoint: tuple indicating the protocol (http, https), the host, and (optionally) the port where the node is listening. -# - timeout: timeout in ms for the rpc requests against the node. -# endpoint = { protocol = "https", host = "rpc.devnet.miden.io" } -endpoint = { protocol = "http", host = "localhost", port = 57291 } -timeout = 10000 diff --git a/tests/integration/common.rs b/tests/integration/common.rs index 3d65c9e0b..cf2920bde 100644 --- a/tests/integration/common.rs +++ b/tests/integration/common.rs @@ -33,7 +33,7 @@ pub const ACCOUNT_ID_REGULAR: u128 = ACCOUNT_ID_REGULAR_ACCOUNT_UPDATABLE_CODE_O pub type TestClient = Client; -pub const TEST_CLIENT_RPC_CONFIG_FILE_PATH: &str = "./config/miden-client-rpc.toml"; +pub const TEST_CLIENT_RPC_CONFIG_FILE: &str = include_str!("../config/miden-client-rpc.toml"); /// Creates a `TestClient`. /// /// Creates the client using the config at `TEST_CLIENT_CONFIG_FILE_PATH`. The store's path is at a @@ -67,10 +67,7 @@ pub async fn create_test_client() -> TestClient { } pub fn get_client_config() -> (Endpoint, u64, PathBuf) { - let rpc_config_toml = std::fs::read_to_string(TEST_CLIENT_RPC_CONFIG_FILE_PATH) - .unwrap() - .parse::() - .unwrap(); + let rpc_config_toml = TEST_CLIENT_RPC_CONFIG_FILE.parse::
().unwrap(); let rpc_endpoint_toml = rpc_config_toml["endpoint"].as_table().unwrap(); let protocol = rpc_endpoint_toml["protocol"].as_str().unwrap().to_string();