certd/packages/executor/test/index.test.js

29 lines
874 B
JavaScript
Raw Normal View History

2020-12-20 16:32:17 +00:00
import pkg from 'chai'
import { Executor } from '../src/index.js'
2020-12-25 17:37:53 +00:00
import { createOptions } from '../../../test/options.js'
2020-12-20 16:32:17 +00:00
const { expect } = pkg
describe('AutoDeploy', function () {
it('#run', async function () {
2020-12-25 17:37:53 +00:00
const options = createOptions()
2020-12-20 16:32:17 +00:00
const executor = new Executor()
const ret = await executor.run(options)
expect(ret).ok
expect(ret.cert).ok
})
it('#forceCert', async function () {
const executor = new Executor()
2020-12-25 17:37:53 +00:00
const options = createOptions()
2020-12-20 16:32:17 +00:00
const ret = await executor.run(options, { forceCert: true, forceDeploy: false })
expect(ret).ok
expect(ret.cert).ok
})
it('#forceDeploy', async function () {
const executor = new Executor()
2020-12-25 17:37:53 +00:00
const options = createOptions()
2020-12-20 16:32:17 +00:00
const ret = await executor.run(options, { forceCert: false, forceDeploy: true })
expect(ret).ok
expect(ret.cert).ok
})
})