mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-20 06:44:44 +00:00
Fix test
This commit is contained in:
parent
0748517b1b
commit
589948e5a6
6 changed files with 84 additions and 28 deletions
|
@ -129,7 +129,9 @@ test("restore on GHES with AC available ", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
|
@ -183,7 +185,9 @@ test("restore with too many keys should fail", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
expect(failedMock).toHaveBeenCalledWith(
|
||||
`Key Validation Error: Keys are limited to a maximum of 10.`
|
||||
|
@ -209,7 +213,9 @@ test("restore with large key should fail", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
expect(failedMock).toHaveBeenCalledWith(
|
||||
`Key Validation Error: ${key} cannot be larger than 512 characters.`
|
||||
|
@ -235,7 +241,9 @@ test("restore with invalid key should fail", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
expect(failedMock).toHaveBeenCalledWith(
|
||||
`Key Validation Error: ${key} cannot contain commas.`
|
||||
|
@ -270,7 +278,9 @@ test("restore with no cache found", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
|
@ -311,7 +321,9 @@ test("restore with restore keys and no cache found", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
|
@ -351,7 +363,9 @@ test("restore with cache found for key", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
|
@ -393,7 +407,9 @@ test("restore with cache found for restore key", async () => {
|
|||
{
|
||||
lookupOnly: false
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
|
@ -434,7 +450,9 @@ test("restore with lookup-only set", async () => {
|
|||
{
|
||||
lookupOnly: true
|
||||
},
|
||||
false
|
||||
false,
|
||||
undefined,
|
||||
""
|
||||
);
|
||||
|
||||
expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue