mirror of
https://code.forgejo.org/actions/cache.git
synced 2026-06-13 08:35:37 +00:00
feat: add path validation options to restore action
This commit is contained in:
parent
27d5ce7f10
commit
dabc4c2ca1
25 changed files with 201047 additions and 164350 deletions
|
|
@ -35,6 +35,11 @@ beforeAll(() => {
|
|||
.getInputAsBool(name, options);
|
||||
}
|
||||
);
|
||||
|
||||
jest.spyOn(actionUtils, "getPathValidationInput").mockImplementation(() => {
|
||||
const actualUtils = jest.requireActual("../src/utils/actionUtils");
|
||||
return actualUtils.getPathValidationInput();
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
@ -80,7 +85,8 @@ test("restore with no cache found", async () => {
|
|||
key,
|
||||
[],
|
||||
{
|
||||
lookupOnly: false
|
||||
lookupOnly: false,
|
||||
pathValidation: "warn"
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
@ -122,7 +128,8 @@ test("restore with restore keys and no cache found", async () => {
|
|||
key,
|
||||
[restoreKey],
|
||||
{
|
||||
lookupOnly: false
|
||||
lookupOnly: false,
|
||||
pathValidation: "warn"
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
@ -161,7 +168,8 @@ test("restore with cache found for key", async () => {
|
|||
key,
|
||||
[],
|
||||
{
|
||||
lookupOnly: false
|
||||
lookupOnly: false,
|
||||
pathValidation: "warn"
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
@ -204,7 +212,8 @@ test("restore with cache found for restore key", async () => {
|
|||
key,
|
||||
[restoreKey],
|
||||
{
|
||||
lookupOnly: false
|
||||
lookupOnly: false,
|
||||
pathValidation: "warn"
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue