Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit 8ab7f9d

Browse files
committed
simplify service addresses
1 parent cfebbdd commit 8ab7f9d

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

devenv/integration/docker/entrypoint

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env sh
22
set -ueo >/dev/null
33

4-
STACKS=$PROJECT_NAME-stacks-1
5-
API_URL=http://$STACKS:20443/v2/info
6-
BITCOIN=$PROJECT_NAME-bitcoin-1
4+
API_URL=http://stacks:20443/v2/info
75

86
# --- make sure the node is ready before proceeding
97

@@ -24,8 +22,8 @@ done
2422

2523
# push contracts
2624
cd romeo/asset-contract
27-
sed -i "s/localhost:20443/$STACKS:20443/" deployments/default.devnet-plan.yaml
28-
sed -i "s/localhost:18443/$BITCOIN:18443/" deployments/default.devnet-plan.yaml
25+
sed -i "s/localhost:20443/stacks:20443/" deployments/default.devnet-plan.yaml
26+
sed -i "s/localhost:18443/bitcoin:18443/" deployments/default.devnet-plan.yaml
2927
clarinet deployments apply --no-dashboard -d -p deployments/default.devnet-plan.yaml
3028
cd -
3129

romeo/tests/tests/bitcoin_client.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
use std::env;
2-
31
use reqwest::blocking::Client;
42
use serde_json::json;
53
use url::Url;
64

7-
pub fn project_name() -> String {
8-
env::var("PROJECT_NAME").unwrap()
9-
}
10-
115
pub fn bitcoin_url() -> Url {
12-
let base = project_name();
13-
Url::parse(&format!("http://{base}-bitcoin-1:18443")).unwrap()
6+
Url::parse("http://bitcoin:18443").unwrap()
147
}
158

169
pub fn electrs_url() -> Url {
17-
let base = project_name();
18-
Url::parse(&format!("tcp://{base}-electrs-1:60401")).unwrap()
10+
Url::parse("tcp://electrs:60401").unwrap()
1911
}
2012

2113
pub fn generate_blocks(

romeo/tests/tests/stacks_client.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
use std::env;
2-
31
use reqwest::blocking::Client;
42
use url::Url;
53

64
pub fn stacks_url() -> Url {
7-
let base = env::var("PROJECT_NAME").unwrap();
8-
Url::parse(&format!("http://{base}-stacks-1:20443")).unwrap()
5+
Url::parse("http://stacks:20443").unwrap()
96
}
107

118
pub fn fetch_stacks_height(ctx: &Client) -> u64 {

0 commit comments

Comments
 (0)