fix gitea oauth
This commit is contained in:
@@ -47,4 +47,19 @@ func TestHTTPSConfigUsesSecureCookies(t *testing.T) {
|
||||
if !cfg.CookieSecure {
|
||||
t.Fatal("HTTPS mode did not enable secure cookies")
|
||||
}
|
||||
if got := cfg.GiteaInternalURL.String(); got != "http://gitea:3000" {
|
||||
t.Fatalf("GiteaInternalURL = %q, want private Compose URL", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfigAcceptsExplicitInternalGiteaURL(t *testing.T) {
|
||||
setRequiredConfigEnvironment(t, "https")
|
||||
t.Setenv("TAPM_GITEA_INTERNAL_URL", "http://gitea-test:3000")
|
||||
cfg, err := LoadConfig()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := cfg.GiteaInternalURL.String(); got != "http://gitea-test:3000" {
|
||||
t.Fatalf("GiteaInternalURL = %q, want configured private URL", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user