mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-14 01:55:59 +08:00
Concurrency has a min of 1
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user