feat: 统一 Commilitia Drop 全客户端命名与分发
This commit is contained in:
@@ -17,7 +17,7 @@ func TestFetchOAuthConfig_Success(t *testing.T) {
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{
|
||||
"auth_mode": "prod",
|
||||
"broker_url": "https://sso.example.net",
|
||||
"broker_app": "cdrop",
|
||||
"broker_app": "commilitia-drop",
|
||||
})
|
||||
}))
|
||||
defer srv.Close()
|
||||
@@ -30,13 +30,13 @@ func TestFetchOAuthConfig_Success(t *testing.T) {
|
||||
if cfg.BrokerURL != "https://sso.example.net" {
|
||||
t.Errorf("broker_url = %q", cfg.BrokerURL)
|
||||
}
|
||||
if cfg.App != "cdrop" {
|
||||
t.Errorf("app = %q, want cdrop", cfg.App)
|
||||
if cfg.App != "commilitia-drop" {
|
||||
t.Errorf("app = %q, want commilitia-drop", cfg.App)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFetchOAuthConfig_DefaultsApp(t *testing.T) {
|
||||
// broker_app omitted → defaults to "cdrop".
|
||||
// broker_app omitted → defaults to "commilitia-drop".
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"broker_url": "https://sso.example.net"})
|
||||
@@ -46,8 +46,8 @@ func TestFetchOAuthConfig_DefaultsApp(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("FetchOAuthConfig: %v", err)
|
||||
}
|
||||
if cfg.App != "cdrop" {
|
||||
t.Errorf("app = %q, want default cdrop", cfg.App)
|
||||
if cfg.App != "commilitia-drop" {
|
||||
t.Errorf("app = %q, want default commilitia-drop", cfg.App)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user