Skip to content

Commit 5482ca2

Browse files
lpcoxCopilot
andcommitted
test: fix check_workflow_timestamp_api tests for updated error messages
Tests asserted 'integrity check failed' but the error message was changed to 'is outdated or unverifiable' in #24198. Updated all 6 assertions to match the current production error format. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 0b49729 commit 5482ca2

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

actions/setup/js/check_workflow_timestamp_api.test.cjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jobs:
234234
await main();
235235

236236
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("Could not compare frontmatter hashes"));
237-
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("integrity check failed"));
237+
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("is outdated"));
238238
expect(mockCore.summary.addRaw).toHaveBeenCalled();
239239
expect(mockCore.summary.write).toHaveBeenCalled();
240240
});
@@ -245,7 +245,7 @@ jobs:
245245
await main();
246246

247247
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("Could not compare frontmatter hashes"));
248-
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("integrity check failed"));
248+
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("is outdated"));
249249
expect(mockCore.summary.addRaw).toHaveBeenCalled();
250250
expect(mockCore.summary.write).toHaveBeenCalled();
251251
});
@@ -347,7 +347,7 @@ engine: claude
347347

348348
expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Unable to fetch lock file content"));
349349
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("Could not compare frontmatter hashes"));
350-
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("integrity check failed"));
350+
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("is outdated"));
351351
});
352352
});
353353

@@ -699,7 +699,7 @@ engine: copilot
699699
expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Unable to fetch lock file content for hash comparison via API"));
700700
expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("GITHUB_WORKSPACE not available"));
701701
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("Could not compare frontmatter hashes"));
702-
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("integrity check failed"));
702+
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("is outdated"));
703703
});
704704

705705
it("should fail when API fails and local lock file is missing", async () => {
@@ -711,7 +711,7 @@ engine: copilot
711711

712712
expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("Local lock file not found"));
713713
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("Could not compare frontmatter hashes"));
714-
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("integrity check failed"));
714+
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("is outdated"));
715715
});
716716

717717
it("should use API if available even in cross-repo scenario (API preferred over local files)", async () => {
@@ -784,7 +784,7 @@ engine: copilot
784784
// The path traversal is rejected before any file read
785785
expect(mockCore.info).toHaveBeenCalledWith(expect.stringContaining("escapes workspace"));
786786
expect(mockCore.warning).toHaveBeenCalledWith(expect.stringContaining("Could not compare frontmatter hashes"));
787-
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("integrity check failed"));
787+
expect(mockCore.setFailed).toHaveBeenCalledWith(expect.stringContaining("is outdated"));
788788
});
789789
});
790790
});

0 commit comments

Comments
 (0)