mirror of
https://github.com/certd/certd.git
synced 2026-05-01 02:17:27 +08:00
feat: 腾讯云证书tke ingress
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import pkg from 'chai'
|
||||
import { DeployCertToAliyunCDN } from '../../src/aliyun/deploy-to-cdn/index.js'
|
||||
import options from '../options.js'
|
||||
import { Certd } from '@certd/certd'
|
||||
import createOptions from '../../../../test/options.js'
|
||||
const { expect } = pkg
|
||||
describe('DeployToAliyunCDN', function () {
|
||||
it('#execute', async function () {
|
||||
this.timeout(5000)
|
||||
const options = createOptions()
|
||||
const plugin = new DeployCertToAliyunCDN()
|
||||
const certd = new Certd()
|
||||
const cert = certd.readCurrentCert('xiaojunnuo@qq.com', ['*.docmirror.cn'])
|
||||
options.cert.domains = ['*.docmirror.cn', 'docmirror.cn']
|
||||
const certd = new Certd(options)
|
||||
const cert = await certd.readCurrentCert()
|
||||
const ret = await plugin.doExecute({
|
||||
accessProviders: options.accessProviders,
|
||||
cert,
|
||||
|
||||
@@ -1,21 +1,28 @@
|
||||
import pkg from 'chai'
|
||||
import { UploadCertToAliyun } from '../../src/aliyun/upload-to-aliyun/index.js'
|
||||
import options from '../options.js'
|
||||
import { Certd } from '@certd/certd'
|
||||
import { createOptions } from '../../../../test/options.js'
|
||||
const { expect } = pkg
|
||||
describe('PluginUploadToAliyun', function () {
|
||||
it('#execute', async function () {
|
||||
this.timeout(5000)
|
||||
const options = createOptions()
|
||||
options.cert.email = 'xiaojunnuo@qq.com'
|
||||
options.cert.domains = ['_.docmirror.cn']
|
||||
const plugin = new UploadCertToAliyun()
|
||||
const certd = new Certd()
|
||||
const cert = certd.readCurrentCert('xiaojunnuo@qq.com', ['_.docmirror.cn'])
|
||||
const certd = new Certd(options)
|
||||
const cert = await certd.readCurrentCert()
|
||||
const context = {}
|
||||
await plugin.doExecute({
|
||||
const deployOpts = {
|
||||
accessProviders: options.accessProviders,
|
||||
cert,
|
||||
props: { name: 'certd部署测试', accessProvider: 'aliyun' },
|
||||
props: { accessProvider: 'aliyun' },
|
||||
context
|
||||
})
|
||||
|
||||
}
|
||||
await plugin.doExecute(deployOpts)
|
||||
console.log('context:', context)
|
||||
|
||||
// await plugin.sleep(1000)
|
||||
// await plugin.rollback(deployOpts)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user