mirror of
https://github.com/actions/runner-container-hooks.git
synced 2025-12-13 16:16:46 +00:00
Initial Commit
This commit is contained in:
27
packages/k8s/tests/run-container-step-test.ts
Normal file
27
packages/k8s/tests/run-container-step-test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { TestTempOutput } from './test-setup'
|
||||
import * as path from 'path'
|
||||
import { runContainerStep } from '../src/hooks'
|
||||
import * as fs from 'fs'
|
||||
|
||||
jest.useRealTimers()
|
||||
|
||||
let testTempOutput: TestTempOutput
|
||||
|
||||
let runContainerStepJsonPath = path.resolve(
|
||||
`${__dirname}/../../../examples/run-container-step.json`
|
||||
)
|
||||
|
||||
let runContainerStepData: any
|
||||
|
||||
describe('Run container step', () => {
|
||||
beforeAll(() => {
|
||||
const content = fs.readFileSync(runContainerStepJsonPath)
|
||||
runContainerStepData = JSON.parse(content.toString())
|
||||
process.env.RUNNER_NAME = 'testjob'
|
||||
})
|
||||
it('should not throw', async () => {
|
||||
await expect(
|
||||
runContainerStep(runContainerStepData.args)
|
||||
).resolves.not.toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user