1
0
forked from baron/baron-sso

df 클라이언트 상세 조회 테스트 추가

This commit is contained in:
2026-02-10 09:03:34 +09:00
parent 68459151c3
commit 0741baf60b
3 changed files with 206 additions and 1 deletions

View File

@@ -118,6 +118,24 @@ func (m *mockConsentRepo) ListByTenant(ctx context.Context, clientID, tenantID s
return nil, 0, nil
}
// --- Mock Secret Repository ---
type mockSecretRepo struct {
secrets map[string]string
}
func (m *mockSecretRepo) Upsert(ctx context.Context, clientID, secret string) error {
if m.secrets == nil { m.secrets = make(map[string]string) }
m.secrets[clientID] = secret
return nil
}
func (m *mockSecretRepo) GetByID(ctx context.Context, clientID string) (string, error) {
return m.secrets[clientID], nil
}
func (m *mockSecretRepo) Delete(ctx context.Context, clientID string) error {
delete(m.secrets, clientID)
return nil
}
// --- HTTP Mock Helpers ---
@@ -146,4 +164,4 @@ func httpJSONAny(r *http.Request, code int, data any) *http.Response {
Body: io.NopCloser(bytes.NewBuffer(body)),
Request: r,
}
}
}