mirror of https://github.com/actions/toolkit
Fix tests
parent
65892d5ffe
commit
1d403c2fd8
|
@ -138,7 +138,11 @@ test('save cache fails if a signedUploadURL was not passed', async () => {
|
||||||
const key = 'Linux-node-bb828da54c148048dd17899ba9fda624811cfb43'
|
const key = 'Linux-node-bb828da54c148048dd17899ba9fda624811cfb43'
|
||||||
const cachePaths = [path.resolve(paths)]
|
const cachePaths = [path.resolve(paths)]
|
||||||
const signedUploadURL = ''
|
const signedUploadURL = ''
|
||||||
const options: UploadOptions = {useAzureSdk: true}
|
const options: UploadOptions = {
|
||||||
|
useAzureSdk: true,
|
||||||
|
uploadChunkSize: 64 * 1024 * 1024,
|
||||||
|
uploadConcurrency: 8
|
||||||
|
}
|
||||||
|
|
||||||
const createCacheEntryMock = jest
|
const createCacheEntryMock = jest
|
||||||
.spyOn(CacheServiceClientJSON.prototype, 'CreateCacheEntry')
|
.spyOn(CacheServiceClientJSON.prototype, 'CreateCacheEntry')
|
||||||
|
@ -191,7 +195,11 @@ test('finalize save cache failure', async () => {
|
||||||
const cachePaths = [path.resolve(paths)]
|
const cachePaths = [path.resolve(paths)]
|
||||||
const logWarningMock = jest.spyOn(core, 'warning')
|
const logWarningMock = jest.spyOn(core, 'warning')
|
||||||
const signedUploadURL = 'https://blob-storage.local?signed=true'
|
const signedUploadURL = 'https://blob-storage.local?signed=true'
|
||||||
const options: UploadOptions = {useAzureSdk: true}
|
const options: UploadOptions = {
|
||||||
|
useAzureSdk: true,
|
||||||
|
uploadChunkSize: 64 * 1024 * 1024,
|
||||||
|
uploadConcurrency: 8
|
||||||
|
}
|
||||||
|
|
||||||
const createCacheEntryMock = jest
|
const createCacheEntryMock = jest
|
||||||
.spyOn(CacheServiceClientJSON.prototype, 'CreateCacheEntry')
|
.spyOn(CacheServiceClientJSON.prototype, 'CreateCacheEntry')
|
||||||
|
@ -260,7 +268,11 @@ test('save with valid inputs uploads a cache', async () => {
|
||||||
const cachePaths = [path.resolve(paths)]
|
const cachePaths = [path.resolve(paths)]
|
||||||
const signedUploadURL = 'https://blob-storage.local?signed=true'
|
const signedUploadURL = 'https://blob-storage.local?signed=true'
|
||||||
const createTarMock = jest.spyOn(tar, 'createTar')
|
const createTarMock = jest.spyOn(tar, 'createTar')
|
||||||
const options: UploadOptions = {useAzureSdk: true}
|
const options: UploadOptions = {
|
||||||
|
useAzureSdk: true,
|
||||||
|
uploadChunkSize: 64 * 1024 * 1024,
|
||||||
|
uploadConcurrency: 8
|
||||||
|
}
|
||||||
|
|
||||||
const archiveFileSize = 1024
|
const archiveFileSize = 1024
|
||||||
jest
|
jest
|
||||||
|
|
|
@ -465,7 +465,7 @@ async function saveCacheV2(
|
||||||
// Override UploadOptions to force the use of Azure
|
// Override UploadOptions to force the use of Azure
|
||||||
options = {
|
options = {
|
||||||
...options,
|
...options,
|
||||||
uploadChunkSize: 64 * 1024 * 1024, // 128MiB
|
uploadChunkSize: 64 * 1024 * 1024, // 64 MiB
|
||||||
uploadConcurrency: 8, // 8 workers for parallel upload
|
uploadConcurrency: 8, // 8 workers for parallel upload
|
||||||
useAzureSdk: true
|
useAzureSdk: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue