Concurrency has a min of 1

This commit is contained in:
Yang Cao committed 2025-01-08 18:14:04 +00:00
1 parent f001ee669d
commit 11b17a3847
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -85,6 +85,14 @@ describe('uploadConcurrencyEnv', () => {
}).toThrow()
})
it('should throw if ACTIONS_UPLOAD_CONCURRENCY is < 1', () => {
;(os.cpus as jest.Mock).mockReturnValue(new Array(4))
process.env.ACTIONS_UPLOAD_CONCURRENCY = '0'
expect(() => {
config.getConcurrency()
}).toThrow()
})
it('cannot go over currency cap when override value is greater', () => {
;(os.cpus as jest.Mock).mockReturnValue(new Array(4))
process.env.ACTIONS_UPLOAD_CONCURRENCY = '40'