• shaw's avatar
    fix: 将 DriveClient 注入 GeminiOAuthService,消除单元测试中的真实 HTTP 调用 · c75c6b68
    shaw authored
    FetchGoogleOneTier 原先在方法内部直接创建 DriveClient 实例,
    导致单元测试中对 googleapis.com 发起真实 HTTP 请求,在 CI 环境
    产生 401 错误。
    
    将 DriveClient 作为依赖注入到 GeminiOAuthService,遵循项目
    端口与适配器架构规范:
    - 新增 repository/gemini_drive_client.go 作为 Provider
    - 注册到 repository Wire ProviderSet
    - 测试中使用 mockDriveClient 替代真实调用
    c75c6b68
wire_gen.go 22.4 KB