Files
runner-container-hooks/packages/k8s/tests/run-container-step-test.ts
T

32 lines
797 B
TypeScript
Raw Normal View History

import * as fs from 'fs'
2022-06-02 15:53:11 -04:00
import * as path from 'path'
import { runContainerStep } from '../src/hooks'
import { TestHelper } from './test-setup'
2022-06-02 15:53:11 -04:00
jest.useRealTimers()
2022-06-06 00:21:44 -04:00
let testHelper: TestHelper
2022-06-02 15:53:11 -04:00
let runContainerStepJsonPath = path.resolve(
`${__dirname}/../../../examples/run-container-step.json`
)
let runContainerStepData: any
describe('Run container step', () => {
2022-06-06 00:21:44 -04:00
beforeAll(async () => {
2022-06-02 15:53:11 -04:00
const content = fs.readFileSync(runContainerStepJsonPath)
runContainerStepData = JSON.parse(content.toString())
2022-06-06 00:21:44 -04:00
testHelper = new TestHelper()
await testHelper.initialize()
2022-06-02 15:53:11 -04:00
})
it('should not throw', async () => {
await expect(
runContainerStep(runContainerStepData.args)
).resolves.not.toThrow()
})
2022-06-06 00:21:44 -04:00
afterEach(async () => {
await testHelper.cleanup()
})
2022-06-02 15:53:11 -04:00
})