BREAKING CHANGE(core): streamline scope to certificate retrieval using dns challenge

This commit is contained in:
2020-02-10 20:13:06 +00:00
parent c2036bba90
commit 59173b3ca8
10 changed files with 116 additions and 234 deletions

View File

@ -1,7 +1,12 @@
import { tap, expect } from '@pushrocks/tapbundle';
import { Qenv } from '@pushrocks/qenv';
import * as cloudflare from '@mojoio/cloudflare';
const testQenv = new Qenv('./', './.nogit/');
const testCloudflare = new cloudflare.CloudflareAccount({
email: testQenv.getEnvVarOnDemand('CF_EMAIL'),
key: testQenv.getEnvVarOnDemand('CF_KEY')
});
import * as smartacme from '../ts/index';
@ -16,11 +21,11 @@ tap.test('should create a valid instance of SmartAcme', async () => {
mongoDbPass: testQenv.getEnvVarRequired('MONGODB_PASSWORD'),
mongoDbUrl: testQenv.getEnvVarRequired('MONGODB_URL')
},
removeChallenge: async (...args) => {
console.log(args);
removeChallenge: async (dnsChallenge) => {
testCloudflare.convenience.acmeRemoveDnsChallenge(dnsChallenge);
},
setChallenge: async (...args) => {
console.log(args);
setChallenge: async (dnsChallenge) => {
testCloudflare.convenience.acmeSetDnsChallenge(dnsChallenge);
},
environment: 'integration'
});