()
| 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] |
| 1355 | log_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() { |
nothing calls this directly
no test coverage detected