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

Function file_oidc_block_populates_oidc_args

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

Source from the content-addressed store, hash-verified

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]
1376issuer = "https://idp.example.com"
1377audience = "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() {

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