fix gitea oauth

This commit is contained in:
2026-07-28 18:49:30 -05:00
parent 48f7dad599
commit 7f24b64906
10 changed files with 45 additions and 6 deletions
+15
View File
@@ -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)
}
}