Add limitation and throw if an entrypoint is not specified for container step (#77)

This commit is contained in:
Nikola Jokic
2023-07-17 11:02:03 +02:00
committed by GitHub
parent 586a052286
commit 8b83223a2b
2 changed files with 9 additions and 24 deletions

View File

@@ -23,16 +23,11 @@ describe('Run container step', () => {
expect(exitCode).toBe(0)
})
it('should fail if the working directory does not exist', async () => {
runContainerStepData.args.workingDirectory = '/foo/bar'
await expect(runContainerStep(runContainerStepData.args)).rejects.toThrow()
})
it('should shold have env variables available', async () => {
runContainerStepData.args.entryPoint = 'bash'
runContainerStepData.args.entryPointArgs = [
'-c',
"'if [[ -z $NODE_ENV ]]; then exit 1; fi'"
'if [[ -z $NODE_ENV ]]; then exit 1; fi'
]
await expect(
runContainerStep(runContainerStepData.args)