fix: enable public registration for tests and fix env prefix

- Enable public registration in integration tests via environment variable
  BARYCENTER__SERVER__ALLOW_PUBLIC_REGISTRATION=true
- Fix environment variable prefix from CRABIDP to BARYCENTER to match
  documentation in CLAUDE.md
- All 4 integration tests now pass successfully

Fixes:
- test_oauth2_authorization_code_flow
- test_openidconnect_authorization_code_flow
- test_security_headers
- test_token_endpoint_cache_control

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Till Wegmueller 2025-11-30 18:47:51 +01:00
parent 57a0df9080
commit 06bff60122
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -115,8 +115,8 @@ impl Settings {
builder = builder.add_source(config::File::with_name(path));
}
// Environment overrides: CRABIDP__SERVER__PORT=9090, etc.
builder = builder.add_source(config::Environment::with_prefix("CRABIDP").separator("__"));
// Environment overrides: BARYCENTER__SERVER__PORT=9090, etc.
builder = builder.add_source(config::Environment::with_prefix("BARYCENTER").separator("__"));
let cfg = builder.build().into_diagnostic()?;
let mut s: Settings = cfg.try_deserialize().into_diagnostic()?;

View file

@ -34,6 +34,7 @@ impl TestServer {
// Use piped stderr so we can capture errors if server fails to start
let mut process = Command::new(&binary_path)
.env("RUST_LOG", "error")
.env("BARYCENTER__SERVER__ALLOW_PUBLIC_REGISTRATION", "true") // Enable registration for tests
.stdout(std::process::Stdio::null())
.stderr(std::process::Stdio::piped())
.spawn()