acme-dns-01-vultr.js/test.js

25 lines
633 B
JavaScript
Raw Permalink Normal View History

2019-06-10 13:54:39 +00:00
#!/usr/bin/env node
'use strict';
2019-06-13 19:32:42 +00:00
// https://git.rootprojects.org/root/acme-dns-01-test.js
var tester = require('acme-dns-01-test');
2019-06-10 13:54:39 +00:00
// Usage: node ./test.js example.com xxxxxxxxx
var zone = process.argv[2];
var challenger = require('./index.js').create({
2019-06-13 19:32:42 +00:00
apiKey: process.argv[3]
2019-06-10 13:54:39 +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-06-13 19:32:42 +00:00
.testZone('dns-01', zone, challenger)
2019-06-10 13:54:39 +00:00
.then(function() {
2019-06-13 19:32:42 +00:00
console.info('PASS', zone);
2019-06-10 13:54:39 +00:00
})
.catch(function(e) {
2019-06-13 19:32:42 +00:00
console.info('FAIL', zone);
2019-06-10 13:54:39 +00:00
console.error(e.message);
console.error(e.stack);
});