2019-07-28 11:28:13 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
// See https://git.coolaj86.com/coolaj86/acme-challenge-test.js
|
|
|
|
var tester = require('acme-challenge-test');
|
|
|
|
require('dotenv').config();
|
|
|
|
|
|
|
|
// Usage: node ./test.js example.com xxxxxxxxx
|
|
|
|
var zone = process.argv[2] || process.env.ZONE;
|
|
|
|
var challenger = require('./index.js').create({
|
|
|
|
key: process.argv[3] || process.env.KEY,
|
|
|
|
secret: process.argv[4] || process.env.SECRET,
|
|
|
|
baseUrl: process.argv[5] || process.env.BASE_URL
|
|
|
|
});
|
|
|
|
|
|
|
|
// The dry-run tests can pass on, literally, 'example.com'
|
|
|
|
// but the integration tests require that you have control over the domain
|
|
|
|
tester
|
|
|
|
.testZone('dns-01', zone, challenger)
|
2021-04-04 16:51:43 +00:00
|
|
|
.then(function () {
|
2019-07-28 11:28:13 +00:00
|
|
|
console.info('PASS', zone);
|
|
|
|
})
|
2021-04-04 16:51:43 +00:00
|
|
|
.catch(function (e) {
|
2019-07-28 11:28:13 +00:00
|
|
|
console.error(e.message);
|
|
|
|
console.error(e.stack);
|
|
|
|
});
|