Skip to content

Commit a898b46

Browse files
committed
test(oauth): clear only the fixture's Redis flags in the revocation suite
1 parent 31f17e0 commit a898b46

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎apps/sim/lib/oauth/credential-revocation.integration.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,15 @@ async function insertSlackInstallation() {
100100
)
101101
}
102102

103-
/** Lapses the hour-long Redis flags, leaving only what the database recorded. */
103+
/** Lapses this fixture's hour-long Redis flags, leaving only what the database recorded. */
104104
async function expireRedisFlags() {
105105
const redis = getRedisClient()
106106
if (!redis) return
107-
const keys = await redis.keys('oauth:dead:*')
108-
if (keys.length > 0) await redis.del(...keys)
107+
await redis.del(
108+
...[accountId, `slack:${SLACK_TEAM_ID}`].map(
109+
(scope) => `oauth:dead:${getOAuthRefreshCoordinationIdentity(scope)}`
110+
)
111+
)
109112
}
110113

111114
beforeAll(async () => {

0 commit comments

Comments
 (0)