MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / env_var_overrides_file_value

Function env_var_overrides_file_value

crates/openshell-server/src/cli.rs:1344–1361  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1342
1343 #[test]
1344 fn env_var_overrides_file_value() {
1345 let _lock = ENV_LOCK
1346 .lock()
1347 .unwrap_or_else(std::sync::PoisonError::into_inner);
1348 let _g = EnvVarGuard::set("OPENSHELL_LOG_LEVEL", "trace");
1349
1350 let (mut args, matches) =
1351 parse_with_args(&["openshell-gateway", "--db-url", "sqlite::memory:"]);
1352 let file = config_file_from_toml(
1353 r#"
1354[openshell.gateway]
1355log_level = "debug"
1356"#,
1357 );
1358 merge_file_into_args(&mut args, &file.openshell.gateway, &matches);
1359
1360 assert_eq!(args.log_level, "trace", "env var must win over file");
1361 }
1362
1363 #[test]
1364 fn file_oidc_block_populates_oidc_args() {

Callers

nothing calls this directly

Calls 3

parse_with_argsFunction · 0.85
config_file_from_tomlFunction · 0.85
merge_file_into_argsFunction · 0.85

Tested by

no test coverage detected