mirror of
https://github.com/actions/cache.git
synced 2025-04-19 02:26:45 +00:00
Fix save-always/post-if with an output
This commit is contained in:
parent
0c45773b62
commit
7214f3c546
6 changed files with 65 additions and 16 deletions
|
@ -86,7 +86,8 @@ test("restore with no cache found", async () => {
|
|||
);
|
||||
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
||||
expect(outputMock).toHaveBeenCalledTimes(1);
|
||||
expect(outputMock).toHaveBeenCalledWith("save-always-d18d746b9", "");
|
||||
expect(outputMock).toHaveBeenCalledTimes(2);
|
||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||
|
||||
expect(infoMock).toHaveBeenCalledWith(
|
||||
|
@ -169,8 +170,9 @@ test("restore with cache found for key", async () => {
|
|||
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-hit", "true");
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-matched-key", key);
|
||||
expect(outputMock).toHaveBeenCalledWith("save-always-d18d746b9", "");
|
||||
|
||||
expect(outputMock).toHaveBeenCalledTimes(3);
|
||||
expect(outputMock).toHaveBeenCalledTimes(4);
|
||||
|
||||
expect(infoMock).toHaveBeenCalledWith(`Cache restored from key: ${key}`);
|
||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||
|
@ -212,8 +214,9 @@ test("restore with cache found for restore key", async () => {
|
|||
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-hit", "false");
|
||||
expect(outputMock).toHaveBeenCalledWith("cache-matched-key", restoreKey);
|
||||
expect(outputMock).toHaveBeenCalledWith("save-always-d18d746b9", "");
|
||||
|
||||
expect(outputMock).toHaveBeenCalledTimes(3);
|
||||
expect(outputMock).toHaveBeenCalledTimes(4);
|
||||
|
||||
expect(infoMock).toHaveBeenCalledWith(
|
||||
`Cache restored from key: ${restoreKey}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue