Skip to content

Commit 28bf05f

Browse files
committed
test(webapp): drop a stale assertion that contradicted the graced-group fix
Running the Postgres suites surfaced two tests asserting opposite things about the same gesture. One was written before groups became all-or-nothing and expected the list to survive a save that omits it, which is the behaviour that made unset a silent no-op. It is replaced with the property that is actually correct: resubmitting the same list alongside another flag leaves the list and its cutover clock alone. Nothing in the implementation changed here. Only a test that encoded the old bug did.
1 parent 5457bfd commit 28bf05f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

apps/webapp/test/runOpsMintShardSetFlip.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,31 @@ describe("replaceGlobalFeatureFlags — the admin page cannot bypass the stamp",
155155
expect(m[FEATURE_FLAG.runOpsMintShardSetFlippedAt]).not.toBe("1999-01-01T00:00:00.000Z");
156156
});
157157

158-
postgresTest("the set trio survives a save that omits the set keys", async ({ prisma }) => {
158+
postgresTest("a co-submitted flag does not disturb a resubmitted list", async ({ prisma }) => {
159159
await replaceGlobalFeatureFlags(prisma, {
160160
requestedFlags: { [FEATURE_FLAG.runOpsMintShardSet]: "a,b" },
161161
catalogKeys: CATALOG_KEYS,
162162
isProtected: NEVER_PROTECTED,
163163
graceMs: 60_000,
164164
});
165+
const first = await readFlags(prisma, SET_KEYS);
165166

166167
await replaceGlobalFeatureFlags(prisma, {
167-
requestedFlags: { [FEATURE_FLAG.mollifierEnabled]: true },
168+
requestedFlags: {
169+
[FEATURE_FLAG.runOpsMintShardSet]: "a,b",
170+
[FEATURE_FLAG.mollifierEnabled]: true,
171+
},
168172
catalogKeys: CATALOG_KEYS,
169173
isProtected: NEVER_PROTECTED,
170174
graceMs: 60_000,
171175
});
172176

173177
const m = await readFlags(prisma, SET_KEYS);
174178
expect(m[FEATURE_FLAG.runOpsMintShardSet]).toBe("a,b");
179+
// Resubmitting the same list is not a flip, so the cutover clock is not reset.
180+
expect(m[FEATURE_FLAG.runOpsMintShardSetFlippedAt]).toBe(
181+
first[FEATURE_FLAG.runOpsMintShardSetFlippedAt]
182+
);
175183
});
176184

177185
postgresTest(

0 commit comments

Comments
 (0)