fix installer

This commit is contained in:
Daniel Noulet 2026-10-02 21:45:42 +02:00
parent 46030a5b14
commit c2091e746a
19 changed files with 264 additions and 73 deletions

View file

@ -43,3 +43,17 @@ func TestLoadAllowsDatabaseLoginWithoutBootstrapAccount(t *testing.T) {
t.Fatalf("Load() error = %v", err)
}
}
func TestLoadDerivesOIDCRedirectURLFromBaseURL(t *testing.T) {
t.Setenv("GO_LOOSE_SESSION_SECRET", "01234567890123456789012345678901")
t.Setenv("GO_LOOSE_BASE_URL", "http://auth.dev:18080/")
t.Setenv("GO_LOOSE_OIDC_REDIRECT_URL", "")
cfg, err := Load()
if err != nil {
t.Fatal(err)
}
if cfg.OIDCRedirectURL != "http://auth.dev:18080/auth/callback" {
t.Fatalf("OIDC redirect URL = %q", cfg.OIDCRedirectURL)
}
}