mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-14 08:36:45 +00:00
fixing issue related to setting hostPort and containerPort when format is port/proto (#38)
* fixing issue related to setting hostPort and containerPort when format is port/proto * added one more test case and refactored containerPorts to be without regexp * added throw on ports outside of (0,65536) range with test * repaired error message and added tests to multi splits. refactored port checking
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
getSecretName,
|
||||
getStepPodName,
|
||||
getVolumeClaimName,
|
||||
JOB_CONTAINER_NAME,
|
||||
MAX_POD_NAME_LENGTH,
|
||||
RunnerInstanceLabel,
|
||||
STEP_POD_NAME_SUFFIX_LENGTH
|
||||
@@ -170,4 +171,12 @@ describe('constants', () => {
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe('const values', () => {
|
||||
it('should have constants set', () => {
|
||||
expect(JOB_CONTAINER_NAME).toBeTruthy()
|
||||
expect(MAX_POD_NAME_LENGTH).toBeGreaterThan(0)
|
||||
expect(STEP_POD_NAME_SUFFIX_LENGTH).toBeGreaterThan(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user