1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-26 13:49:56 +02:00

Restore original behavior of cache-hit output (#1467)

* Restore original behavior of `cache-hit` output

* Bump version to 4.1.1
This commit is contained in:
Josh Gross 2024-10-08 13:08:22 -04:00 committed by GitHub
parent 2cdf405574
commit 3624ceb22c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 18 additions and 12 deletions

View file

@ -260,7 +260,7 @@ test("Fail restore when fail on cache miss is enabled and primary + restore keys
);
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(0);
expect(failedMock).toHaveBeenCalledWith(
`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${key}`

View file

@ -86,8 +86,7 @@ test("restore with no cache found", async () => {
);
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
expect(outputMock).toHaveBeenCalledWith("cache-hit", "false");
expect(outputMock).toHaveBeenCalledTimes(2);
expect(outputMock).toHaveBeenCalledTimes(1);
expect(failedMock).toHaveBeenCalledTimes(0);
expect(infoMock).toHaveBeenCalledWith(