3
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2026-07-22 11:15:51 +00:00

Implemented

This commit is contained in:
Boris Staal 2023-04-09 10:24:49 -05:00
parent 88522ab9f3
commit f12187b90c
No known key found for this signature in database
29 changed files with 272142 additions and 230372 deletions

View file

@ -1,6 +1,6 @@
import * as cache from "@actions/cache";
import * as core from "@actions/core";
import * as cache from "../src/backend";
import { Events, RefKey } from "../src/constants";
import run from "../src/restoreOnly";
import * as actionUtils from "../src/utils/actionUtils";
@ -82,7 +82,8 @@ test("restore with no cache found", async () => {
{
lookupOnly: false
},
false
{ credentials: { accessKeyId: "", secretAccessKey: "" }, region: "" },
""
);
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
@ -124,7 +125,8 @@ test("restore with restore keys and no cache found", async () => {
{
lookupOnly: false
},
false
{ credentials: { accessKeyId: "", secretAccessKey: "" }, region: "" },
""
);
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
@ -163,7 +165,8 @@ test("restore with cache found for key", async () => {
{
lookupOnly: false
},
false
{ credentials: { accessKeyId: "", secretAccessKey: "" }, region: "" },
""
);
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
@ -206,7 +209,8 @@ test("restore with cache found for restore key", async () => {
{
lookupOnly: false
},
false
{ credentials: { accessKeyId: "", secretAccessKey: "" }, region: "" },
""
);
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);