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

32 lines
970 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 () {
2021-01-08 08:59:53 +00:00
this.timeout(120000)
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 () {
2021-01-08 08:59:53 +00:00
this.timeout(120000)
2020-12-20 16:32:17 +00:00
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 () {
2021-01-08 08:59:53 +00:00
this.timeout(120000)
2020-12-20 16:32:17 +00:00
const executor = new Executor()
2020-12-25 17:37:53 +00:00
const options = createOptions()
const ret = await executor.run(options, { forceCert: false, forceDeploy: true, forceRedeploy: true })
2020-12-20 16:32:17 +00:00
expect(ret).ok
expect(ret.cert).ok
})
})