mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-06-12 23:21:12 +00:00
Removing GHES condition to enabled cache for GHES
This commit is contained in:
parent
611465405c
commit
8bcf0245bb
8 changed files with 2 additions and 96 deletions
|
@ -52,8 +52,6 @@ beforeAll(() => {
|
|||
beforeEach(() => {
|
||||
process.env[Events.Key] = Events.Push;
|
||||
process.env[RefKey] = "refs/heads/feature-branch";
|
||||
|
||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => false);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -101,20 +99,6 @@ test("save with no primary key in state outputs warning", async () => {
|
|||
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||
});
|
||||
|
||||
test("save on GHES should no-op", async () => {
|
||||
jest.spyOn(actionUtils, "isGhes").mockImplementation(() => true);
|
||||
|
||||
const logWarningMock = jest.spyOn(actionUtils, "logWarning");
|
||||
const saveCacheMock = jest.spyOn(cache, "saveCache");
|
||||
|
||||
await run();
|
||||
|
||||
expect(saveCacheMock).toHaveBeenCalledTimes(0);
|
||||
expect(logWarningMock).toHaveBeenCalledWith(
|
||||
"Cache action is not supported on GHES. See https://github.com/actions/cache/issues/505 for more details"
|
||||
);
|
||||
});
|
||||
|
||||
test("save with exact match returns early", async () => {
|
||||
const infoMock = jest.spyOn(core, "info");
|
||||
const failedMock = jest.spyOn(core, "setFailed");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue