fix(core): update

This commit is contained in:
2019-01-08 20:45:35 +01:00
parent 0faebf2a79
commit 62d27619f4
14 changed files with 946 additions and 327 deletions

View File

@ -1,12 +1,14 @@
import { tap, expect } from '@pushrocks/tapbundle';
import { Qenv } from '@pushrocks/qenv';
const testQenv = new Qenv('./', './.nogit/');
import * as smartacme from '../ts/index';
let smartAcmeInstance: smartacme.SmartAcme;
tap.test('should create a valid instance of SmartAcme', async () => {
smartAcmeInstance = new smartacme.SmartAcme();
await smartAcmeInstance.init({
smartAcmeInstance = new smartacme.SmartAcme({
accountEmail: 'domains@lossless.org',
accountPrivateKey: null,
removeChallenge: async (...args) => {
@ -14,9 +16,15 @@ tap.test('should create a valid instance of SmartAcme', async () => {
},
setChallenge: async (...args) => {
console.log(args);
}
},
mongoDescriptor: {
mongoDbName: testQenv.getEnvVarOnDemand('MONGODB_DATABASE'),
mongoDbPass: testQenv.getEnvVarOnDemand('MONGODB_PASSWORD'),
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGODB_URL')
}
});
// await smartAcmeInstance.getCertificateForDomain('bleu.de');
await smartAcmeInstance.init();
await smartAcmeInstance.getCertificateForDomain('bleu.de');
});
tap.start();