2019-06-07 04:48:34 +00:00
|
|
|
'use strict';
|
2019-04-07 21:55:48 +00:00
|
|
|
|
2019-06-13 06:36:53 +00:00
|
|
|
//var tester = require('acme-dns-01-test');
|
2019-06-07 04:48:34 +00:00
|
|
|
var tester = require('./');
|
2019-04-07 21:55:48 +00:00
|
|
|
|
2019-06-07 06:48:10 +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
|
2019-06-07 04:48:34 +00:00
|
|
|
var zone = 'example.com';
|
2019-04-07 21:55:48 +00:00
|
|
|
|
2019-06-03 04:08:29 +00:00
|
|
|
tester
|
2019-06-13 06:36:53 +00:00
|
|
|
// Will test these domain records
|
|
|
|
// - example.com
|
|
|
|
// - foo.example.com
|
|
|
|
// - *.foo.example.com
|
|
|
|
.testZone(type, zone, challenger)
|
2019-06-03 04:08:29 +00:00
|
|
|
.then(function() {
|
2019-06-07 04:48:34 +00:00
|
|
|
console.info('ALL PASSED');
|
2019-06-03 04:08:29 +00:00
|
|
|
})
|
|
|
|
.catch(function(err) {
|
2019-06-07 04:48:34 +00:00
|
|
|
console.error('FAIL');
|
2019-06-03 04:08:29 +00:00
|
|
|
console.error(err);
|
|
|
|
process.exit(20);
|
|
|
|
});
|