Skip to content

Commit 88529fe

Browse files
committed
graph: make GraphNodeConfig ipfs_uri configurable via env var
WARN (edge-case): Empty GRAPH_TEST_IPFS_URL values are not explicitly checked. An empty value would produce an immediate connection error at graph-node startup, not silent data corruption. Note: 2 pre-existing test failures in gnd package (test_schema_codegen_snapshot, test_format_typescript_graceful_fallback) are outside the scope.
1 parent 68d0593 commit 88529fe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/src/config.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ impl GraphNodeConfig {
143143
Self {
144144
bin,
145145
ports: GraphNodePorts::default(),
146-
ipfs_uri: "http://localhost:3001".to_string(),
146+
ipfs_uri: std::env::var("GRAPH_TEST_IPFS_URL")
147+
.unwrap_or_else(|_| "http://127.0.0.1:3001".to_string()),
147148
log_file: TestFile::new("integration-tests/graph-node.log"),
148149
}
149150
}
@@ -157,7 +158,8 @@ impl Default for GraphNodeConfig {
157158
Self {
158159
bin,
159160
ports: GraphNodePorts::default(),
160-
ipfs_uri: "http://localhost:3001".to_string(),
161+
ipfs_uri: std::env::var("GRAPH_TEST_IPFS_URL")
162+
.unwrap_or_else(|_| "http://127.0.0.1:3001".to_string()),
161163
log_file: TestFile::new("integration-tests/graph-node.log"),
162164
}
163165
}

0 commit comments

Comments
 (0)