(overrides?: Partial<User>)
| 95 | } |
| 96 | |
| 97 | function buildUser(overrides?: Partial<User>): User { |
| 98 | return { |
| 99 | id: 10, |
| 100 | name: "u1", |
| 101 | description: "", |
| 102 | role: "user", |
| 103 | rpm: null, |
| 104 | dailyQuota: null, |
| 105 | providerGroup: null, |
| 106 | tags: [], |
| 107 | createdAt: new Date("2026-01-01T00:00:00.000Z"), |
| 108 | updatedAt: new Date("2026-01-02T00:00:00.000Z"), |
| 109 | deletedAt: undefined, |
| 110 | limit5hUsd: undefined, |
| 111 | limitWeeklyUsd: undefined, |
| 112 | limitMonthlyUsd: undefined, |
| 113 | limitTotalUsd: null, |
| 114 | limitConcurrentSessions: undefined, |
| 115 | dailyResetMode: "fixed", |
| 116 | dailyResetTime: "00:00", |
| 117 | isEnabled: true, |
| 118 | expiresAt: null, |
| 119 | allowedClients: [], |
| 120 | allowedModels: [], |
| 121 | ...overrides, |
| 122 | }; |
| 123 | } |
| 124 | |
| 125 | describe("API Key 鉴权缓存:VacuumFilter -> Redis -> DB", () => { |
| 126 | test("findActiveKeyByKeyString:Vacuum Filter 误判缺失时,Redis 命中应纠正(避免误拒绝)", async () => { |
no outgoing calls
no test coverage detected