2019-06-08 16:15:58 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
'use strict';
|
|
|
|
|
2019-07-16 15:04:09 +00:00
|
|
|
// https://git.rootprojects.org/root/acme-dns-01-test.js
|
2019-07-18 06:18:53 +00:00
|
|
|
var tester = require('acme-challenge-test');
|
2019-06-08 16:15:58 +00:00
|
|
|
|
|
|
|
// Usage: node ./test.js example.com xxxxxxxxx
|
|
|
|
var zone = process.argv[2];
|
|
|
|
|
|
|
|
var challenger = require('./index.js').create({
|
|
|
|
apiUser:process.argv[3],
|
|
|
|
apiKey : process.argv[4],
|
2019-07-16 15:04:09 +00:00
|
|
|
clientIp:process.argv[5],
|
2019-07-23 05:45:32 +00:00
|
|
|
username: process.argv[6] || process.argv[3]
|
2019-06-08 16:15:58 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// The dry-run tests can pass on, literally, 'example.com'
|
|
|
|
// but the integration tests require that you have control over the domain
|
|
|
|
tester
|
2019-07-16 15:04:09 +00:00
|
|
|
.testZone('dns-01', zone, challenger)
|
|
|
|
.then(function() {
|
|
|
|
console.info('PASS', zone);
|
|
|
|
})
|
|
|
|
.catch(function(e) {
|
|
|
|
console.info('FAIL', zone);
|
2019-06-08 16:15:58 +00:00
|
|
|
console.error(e.message);
|
2019-07-16 15:04:09 +00:00
|
|
|
console.error(e.stack);
|
|
|
|
});
|
2019-06-08 16:15:58 +00:00
|
|
|
|