fix installer
This commit is contained in:
parent
46030a5b14
commit
c2091e746a
19 changed files with 264 additions and 73 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue