certd/packages/plugins/test/aliyun/upload-to-aliyun.test.js

22 lines
677 B
JavaScript
Raw Normal View History

2020-12-18 17:57:52 +00:00
import pkg from 'chai'
2020-12-20 16:32:17 +00:00
import { UploadCertToAliyun } from '../../src/aliyun/upload-to-aliyun/index.js'
2020-12-18 17:57:52 +00:00
import options from '../options.js'
import { Certd } from '@certd/certd'
const { expect } = pkg
describe('PluginUploadToAliyun', function () {
it('#execute', async function () {
2020-12-20 16:32:17 +00:00
const plugin = new UploadCertToAliyun()
2020-12-18 17:57:52 +00:00
const certd = new Certd()
2020-12-20 16:32:17 +00:00
const cert = certd.readCurrentCert('xiaojunnuo@qq.com', ['_.docmirror.cn'])
2020-12-18 17:57:52 +00:00
const context = {}
await plugin.execute({
accessProviders: options.accessProviders,
cert,
2020-12-20 16:32:17 +00:00
context,
args: { name: 'certd部署测试', provider: 'aliyun' }
2020-12-18 17:57:52 +00:00
})
console.log('context:', context)
})
})