certd/packages/plugins/plugin-tencent/test/dns-providers/dnspod.cert.test.js

28 lines
841 B
JavaScript
Raw Normal View History

2021-01-06 15:29:10 +00:00
import pkg from 'chai'
2021-02-08 05:40:28 +00:00
import PluginTencent from '../../src/index.js'
2021-02-07 16:21:36 +00:00
import { createOptions } from '../../../../../test/options.js'
2021-02-08 05:40:28 +00:00
import { Certd } from '@certd/certd'
2021-01-06 15:29:10 +00:00
const { expect } = pkg
2021-02-08 05:40:28 +00:00
// 安装默认插件和授权提供者
PluginTencent.install()
2021-01-06 15:29:10 +00:00
describe('DnspodDnsProvider', function () {
it('#申请证书', async function () {
this.timeout(300000)
const options = createOptions()
options.cert.domains = ['*.certd.xyz', '*.test.certd.xyz', '*.base.certd.xyz', 'certd.xyz']
2021-02-08 05:40:28 +00:00
options.cert.dnsProvider = {
type: 'dnspod',
accessProvider: 'dnspod'
}
2021-01-06 15:29:10 +00:00
options.args = { forceCert: true }
const certd = new Certd(options)
const cert = await certd.certApply()
expect(cert).ok
expect(cert.crt).ok
expect(cert.key).ok
expect(cert.detail).ok
expect(cert.expires).ok
})
})