From 06bff60122c73374b3014f5df60ba8c28bb0e09f Mon Sep 17 00:00:00 2001 From: Till Wegmueller Date: Sun, 30 Nov 2025 18:47:51 +0100 Subject: [PATCH] fix: enable public registration for tests and fix env prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- src/settings.rs | 4 ++-- tests/integration_test.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/settings.rs b/src/settings.rs index 225ffe4..66c061e 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -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()?; diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 4c72187..9c2716b 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -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()