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