This commit is contained in:
Sampark Sharma
2022-12-29 11:55:10 +00:00
committed by GitHub
parent ec3a87298b
commit da162e46a8
5 changed files with 38 additions and 17 deletions

View File

@@ -142,7 +142,8 @@ test('restore with gzip compressed cache found', async () => {
expect(cacheKey).toBe(key)
expect(getCacheMock).toHaveBeenCalledWith([key], paths, {
compressionMethod: compression
compressionMethod: compression,
crossOsEnabled: false
})
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1)
expect(downloadCacheMock).toHaveBeenCalledWith(
@@ -210,7 +211,8 @@ test('restore with zstd as default but gzip compressed cache found on windows',
expect(cacheKey).toBe(key)
expect(getCacheMock).toHaveBeenNthCalledWith(1, [key], paths, {
compressionMethod: compression
compressionMethod: compression,
crossOsEnabled: false
})
expect(getCacheMock).toHaveBeenNthCalledWith(2, [key], paths, {
compressionMethod: CompressionMethod.Gzip
@@ -276,7 +278,8 @@ test('restore with zstd compressed cache found', async () => {
expect(cacheKey).toBe(key)
expect(getCacheMock).toHaveBeenCalledWith([key], paths, {
compressionMethod: compression
compressionMethod: compression,
crossOsEnabled: false
})
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1)
expect(downloadCacheMock).toHaveBeenCalledWith(
@@ -333,7 +336,8 @@ test('restore with cache found for restore key', async () => {
expect(cacheKey).toBe(restoreKey)
expect(getCacheMock).toHaveBeenCalledWith([key, restoreKey], paths, {
compressionMethod: compression
compressionMethod: compression,
crossOsEnabled: false
})
expect(createTempDirectoryMock).toHaveBeenCalledTimes(1)
expect(downloadCacheMock).toHaveBeenCalledWith(