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

27 lines
618 B
JavaScript
Raw Normal View History

'use strict';
2019-04-07 21:55:48 +00:00
//var tester = require('acme-dns-01-test');
var tester = require('./');
2019-04-07 21:55:48 +00:00
var type = 'dns-01';
var challenger = require('acme-dns-01-cli').create({});
2019-04-07 21:55:48 +00:00
// The dry-run tests can pass on, literally, 'example.com'
// but the integration tests require that you have control over the domain
var zone = 'example.com';
2019-04-07 21:55:48 +00:00
tester
// Will test these domain records
// - example.com
// - foo.example.com
// - *.foo.example.com
.testZone(type, zone, challenger)
.then(function() {
console.info('ALL PASSED');
})
.catch(function(err) {
console.error('FAIL');
console.error(err);
process.exit(20);
});