Skip to content

Commit 38ef999

Browse files
committed
test: accept both OFF-sync refresh outcomes (CI has no catalog source)
1 parent 6c0bde4 commit 38ef999

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎tests/cli-restore-back.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,12 @@ describe("ocx restore back", () => {
9999
CI: "1",
100100
});
101101
expect(result.status).toBe(0);
102-
// #1931: explicit sync now refreshes the ocx-side catalog/cache while OFF; the
103-
// durable policy result is still "Codex config untouched" (mtime asserted below).
104-
expect(`${result.stdout}\n${result.stderr}`).toContain("Codex integration is OFF; catalog and models cache refreshed, Codex config untouched.");
102+
// #1931: explicit sync now refreshes the ocx-side catalog/cache while OFF when a
103+
// catalog source exists ("refreshed") and reports "refresh skipped" otherwise
104+
// (CI has no Codex catalog source). The durable policy invariant is the same in
105+
// both: Codex config is untouched (mtime asserted below).
106+
const combined = `${result.stdout}\n${result.stderr}`;
107+
expect(combined).toMatch(/Codex integration is OFF; catalog (and models cache refreshed|refresh skipped), Codex config untouched\./);
105108
expect(statSync(configPath).mtimeMs).toBe(before);
106109
} finally {
107110
rmSync(codexHome, { recursive: true, force: true });

0 commit comments

Comments
 (0)