From d3e4f218f30bd71a2c29e2b2a1e4f811f4327162 Mon Sep 17 00:00:00 2001 From: Dave Hadka Date: Wed, 30 Sep 2020 08:47:16 -0500 Subject: [PATCH] Use warning instead of info --- __tests__/restore.test.ts | 4 ++-- __tests__/save.test.ts | 4 ++-- dist/restore/index.js | 2 +- dist/save/index.js | 2 +- src/restore.ts | 2 +- src/save.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/__tests__/restore.test.ts b/__tests__/restore.test.ts index f0fde2d..446237c 100644 --- a/__tests__/restore.test.ts +++ b/__tests__/restore.test.ts @@ -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" ); }); diff --git a/__tests__/save.test.ts b/__tests__/save.test.ts index 301344a..ac9d96d 100644 --- a/__tests__/save.test.ts +++ b/__tests__/save.test.ts @@ -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" ); }); diff --git a/dist/restore/index.js b/dist/restore/index.js index c0cf926..373baa0 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -39995,7 +39995,7 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { if (utils.isGhes()) { - core.info("Cache action is not supported on GHES"); + utils.logWarning("Cache action is not supported on GHES"); utils.setCacheHitOutput(false); return; } diff --git a/dist/save/index.js b/dist/save/index.js index 8a9dc59..e9d765d 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -38331,7 +38331,7 @@ function run() { return __awaiter(this, void 0, void 0, function* () { try { if (utils.isGhes()) { - core.info("Cache action is not supported on GHES"); + utils.logWarning("Cache action is not supported on GHES"); return; } if (!utils.isValidEvent()) { diff --git a/src/restore.ts b/src/restore.ts index 015089e..0fa6333 100644 --- a/src/restore.ts +++ b/src/restore.ts @@ -7,7 +7,7 @@ import * as utils from "./utils/actionUtils"; async function run(): Promise { try { if (utils.isGhes()) { - core.info("Cache action is not supported on GHES"); + utils.logWarning("Cache action is not supported on GHES"); utils.setCacheHitOutput(false); return; } diff --git a/src/save.ts b/src/save.ts index beab623..32e9f2f 100644 --- a/src/save.ts +++ b/src/save.ts @@ -7,7 +7,7 @@ import * as utils from "./utils/actionUtils"; async function run(): Promise { try { if (utils.isGhes()) { - core.info("Cache action is not supported on GHES"); + utils.logWarning("Cache action is not supported on GHES"); return; }