3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-26 21:35:33 +00:00

Use warning instead of info

This commit is contained in:
Dave Hadka 2020-09-30 08:47:16 -05:00
parent 55a5894438
commit d3e4f218f3
6 changed files with 8 additions and 8 deletions

View file

@ -58,7 +58,7 @@ test("restore with invalid event outputs warning", async () => {
test("restore on GHES should no-op", async () => {
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
const infoMock = jest.spyOn(core, "info");
const logWarningMock = jest.spyOn(actionUtils, "logWarning");
const restoreCacheMock = jest.spyOn(cache, "restoreCache");
const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
@ -67,7 +67,7 @@ test("restore on GHES should no-op", async () => {
expect(restoreCacheMock).toHaveBeenCalledTimes(0);
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
expect(setCacheHitOutputMock).toHaveBeenCalledWith(false);
expect(infoMock).toHaveBeenCalledWith(
expect(logWarningMock).toHaveBeenCalledWith(
"Cache action is not supported on GHES"
);
});

View file

@ -96,13 +96,13 @@ test("save with no primary key in state outputs warning", async () => {
test("save on GHES should no-op", async () => {
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
const infoMock = jest.spyOn(core, "info");
const logWarningMock = jest.spyOn(actionUtils, "logWarning");
const saveCacheMock = jest.spyOn(cache, "saveCache");
await run();
expect(saveCacheMock).toHaveBeenCalledTimes(0);
expect(infoMock).toHaveBeenCalledWith(
expect(logWarningMock).toHaveBeenCalledWith(
"Cache action is not supported on GHES"
);
});