mirror of
https://github.com/CloudNebulaProject/barycenter.git
synced 2026-04-10 13:10:42 +00:00
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:
parent
57a0df9080
commit
06bff60122
2 changed files with 3 additions and 2 deletions
|
|
@ -115,8 +115,8 @@ impl Settings {
|
||||||
builder = builder.add_source(config::File::with_name(path));
|
builder = builder.add_source(config::File::with_name(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Environment overrides: CRABIDP__SERVER__PORT=9090, etc.
|
// Environment overrides: BARYCENTER__SERVER__PORT=9090, etc.
|
||||||
builder = builder.add_source(config::Environment::with_prefix("CRABIDP").separator("__"));
|
builder = builder.add_source(config::Environment::with_prefix("BARYCENTER").separator("__"));
|
||||||
|
|
||||||
let cfg = builder.build().into_diagnostic()?;
|
let cfg = builder.build().into_diagnostic()?;
|
||||||
let mut s: Settings = cfg.try_deserialize().into_diagnostic()?;
|
let mut s: Settings = cfg.try_deserialize().into_diagnostic()?;
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ impl TestServer {
|
||||||
// Use piped stderr so we can capture errors if server fails to start
|
// Use piped stderr so we can capture errors if server fails to start
|
||||||
let mut process = Command::new(&binary_path)
|
let mut process = Command::new(&binary_path)
|
||||||
.env("RUST_LOG", "error")
|
.env("RUST_LOG", "error")
|
||||||
|
.env("BARYCENTER__SERVER__ALLOW_PUBLIC_REGISTRATION", "true") // Enable registration for tests
|
||||||
.stdout(std::process::Stdio::null())
|
.stdout(std::process::Stdio::null())
|
||||||
.stderr(std::process::Stdio::piped())
|
.stderr(std::process::Stdio::piped())
|
||||||
.spawn()
|
.spawn()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue