From 420483187366da0873f18aacf8d21eee25aeac69 Mon Sep 17 00:00:00 2001 From: Justin Kilpatrick Date: Tue, 18 May 2021 10:25:33 -0400 Subject: [PATCH] Configurable prefix for test-runner This small change allows the test runner address prefix to be a configurable value. --- orchestrator/test_runner/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orchestrator/test_runner/src/main.rs b/orchestrator/test_runner/src/main.rs index 84535eaef..b8bff8b95 100644 --- a/orchestrator/test_runner/src/main.rs +++ b/orchestrator/test_runner/src/main.rs @@ -39,6 +39,8 @@ const OPERATION_TIMEOUT: Duration = Duration::from_secs(30); const TOTAL_TIMEOUT: Duration = Duration::from_secs(300); lazy_static! { + static ref ADDRESS_PREFIX: String = + env::var("ADDRESS_PREFIX").unwrap_or_else(|_| CosmosAddress::DEFAULT_PREFIX.to_owned()); static ref COSMOS_NODE_GRPC: String = env::var("COSMOS_NODE_GRPC").unwrap_or_else(|_| "http://localhost:9090".to_owned()); static ref COSMOS_NODE_ABCI: String = @@ -106,7 +108,7 @@ pub async fn main() { let contact = Contact::new( COSMOS_NODE_GRPC.as_str(), OPERATION_TIMEOUT, - CosmosAddress::DEFAULT_PREFIX, + ADDRESS_PREFIX.as_str(), ) .unwrap();