Skip to content

Commit 75eb37c

Browse files
author
Chris Tilt
committed
Document config file path logic in integration test
1 parent d5bad58 commit 75eb37c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

common/tests/loc_over_bus.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,11 @@ async fn loc_round_trip_over_caryatid() -> Result<()> {
182182
REGISTRY.set(reg.clone()).ok();
183183

184184
// Read the config
185+
// Use an absolute path for the config file so the test works regardless of the working directory.
186+
// This ensures config-rs always finds the file, even when integration tests are run from the workspace root or other locations.
185187
let config = Arc::new(
186188
Config::builder()
187-
.add_source(File::with_name("test"))
189+
.add_source(File::with_name(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/test")))
188190
.add_source(Environment::with_prefix("CARYATID"))
189191
.build()
190192
.unwrap(),

0 commit comments

Comments
 (0)