관리자 AI 제공자 Google OAuth 스코프 형식 수정
Some checks failed
API contract / OpenAPI type drift (push) Failing after 50s

This commit is contained in:
Yun Chan 2026-09-23 16:56:47 +09:00
parent 2e4a6139f0
commit 83a6c8820c
2 changed files with 22 additions and 1 deletions

View file

@ -63,6 +63,21 @@ class StartOAuthTest(unittest.TestCase):
self.assertIn("code_challenge_method=S256", result["authorize_url"])
self.assertNotIn("callback_url", result["authorize_url"])
def test_agy_authorize_url_uses_absolute_scope_urls(self):
# 구글은 축약형(auth/...) 스코프를 인식하지 못해 invalid_scope로 거부한다.
result = svc.start_oauth("agy", "admin@example.com")
authorize_url = result["authorize_url"]
self.assertIn("https://accounts.google.com/o/oauth2/v2/auth?", authorize_url)
for scope in (
"cloud-platform",
"userinfo.email",
"userinfo.profile",
"cclog",
"experimentsandconfigs",
):
self.assertIn(f"https://www.googleapis.com/auth/{scope}", authorize_url)
self.assertNotIn("scope=auth/", authorize_url)
def test_pending_expires(self):
import time