Skip to content

Commit

Permalink
Use warning instead of info
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Hadka committed Sep 30, 2020
1 parent 55a5894 commit d3e4f21
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions __tests__/restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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"
);
});
Expand Down
4 changes: 2 additions & 2 deletions __tests__/save.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
});
Expand Down
2 changes: 1 addition & 1 deletion dist/restore/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/save/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion src/restore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as utils from "./utils/actionUtils";
async function run(): Promise<void> {
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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as utils from "./utils/actionUtils";
async function run(): Promise<void> {
try {
if (utils.isGhes()) {
core.info("Cache action is not supported on GHES");
utils.logWarning("Cache action is not supported on GHES");
return;
}

Expand Down

0 comments on commit d3e4f21

Please sign in to comment.