mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-21 15:05:56 +00:00
test(oauth): align antigravity gate source test with degraded-only re-auth spread (#20067)
The re-auth update paths now spread antigravityPersistStatus() only when the project is degraded, so a healthy re-auth cannot wipe the cooldown evidence buildOAuthTokenUpdate() preserves. Assert that conditional spread at all three route update sites and in persistOAuthConnection, keeping the create-payload assertion.
This commit is contained in:
committed by
diegosouzapw
parent
3274a6d2ec
commit
b294213aff
@@ -32,7 +32,17 @@ test("degrade gate is wired into the exchange, poll-callback and import-token br
|
||||
test("connects are SAVED with degraded status, not rejected", () => {
|
||||
// No 422 rejection in the antigravity project path: the upsert proceeds and
|
||||
// the degraded fields flow into both the update and create payloads.
|
||||
assert.match(routeSource, /\.\.\.antigravityPersistStatus\(degradedProject\)/);
|
||||
// Re-auth updates spread the degraded markers only when the project is degraded,
|
||||
// so a healthy re-auth cannot wipe the cooldown evidence that
|
||||
// buildOAuthTokenUpdate() preserves during an active quota window (#20067).
|
||||
const degradedOnlySpread =
|
||||
/\.\.\.\(degradedProject \? antigravityPersistStatus\(degradedProject\) : \{\}\)/;
|
||||
assert.equal(
|
||||
(routeSource.match(new RegExp(degradedOnlySpread.source, "g")) || []).length,
|
||||
3,
|
||||
"exchange, poll-callback AND import-token updates must carry the degraded markers"
|
||||
);
|
||||
assert.match(persistenceSource, degradedOnlySpread);
|
||||
assert.match(persistenceSource, /\.\.\.antigravityPersistStatus\(degradedProject\)/);
|
||||
assert.match(routeSource, /warning: degradedProject\.warning/);
|
||||
// paste-credentials / device-complete used to hardcode testStatus:"active".
|
||||
|
||||
Reference in New Issue
Block a user