()
| 1362 | |
| 1363 | #[test] |
| 1364 | fn file_oidc_block_populates_oidc_args() { |
| 1365 | let _lock = ENV_LOCK |
| 1366 | .lock() |
| 1367 | .unwrap_or_else(std::sync::PoisonError::into_inner); |
| 1368 | let _g1 = EnvVarGuard::remove("OPENSHELL_OIDC_ISSUER"); |
| 1369 | let _g2 = EnvVarGuard::remove("OPENSHELL_OIDC_AUDIENCE"); |
| 1370 | |
| 1371 | let (mut args, matches) = |
| 1372 | parse_with_args(&["openshell-gateway", "--db-url", "sqlite::memory:"]); |
| 1373 | let file = config_file_from_toml( |
| 1374 | r#" |
| 1375 | [openshell.gateway.oidc] |
| 1376 | issuer = "https://idp.example.com" |
| 1377 | audience = "openshell-cli" |
| 1378 | "#, |
| 1379 | ); |
| 1380 | merge_file_into_args(&mut args, &file.openshell.gateway, &matches); |
| 1381 | |
| 1382 | assert_eq!(args.oidc_issuer.as_deref(), Some("https://idp.example.com")); |
| 1383 | assert_eq!(args.oidc_audience, "openshell-cli"); |
| 1384 | } |
| 1385 | |
| 1386 | #[test] |
| 1387 | fn file_grpc_rate_limit_populates_args_when_cli_omits() { |
nothing calls this directly
no test coverage detected