This commit is contained in:
whywaita 2023-10-18 01:09:16 +09:00
parent 0748517b1b
commit 589948e5a6
No known key found for this signature in database
GPG key ID: 410FE9327D2F4F0E
6 changed files with 84 additions and 28 deletions

View file

@ -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);