2
0
mirror of https://github.com/cderche/greenlock-challenge-s3 synced 2025-05-10 15:36:33 +00:00
2019-05-08 18:34:39 +01:00

30 lines
821 B
JavaScript

console.log('Testing the challenge.');
require('dotenv').config();
let accessKeyId = process.env.AWS_ACCESS_KEY_ID
secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY
regionName = process.env.AWS_BUCKET_REGION
bucketName = process.env.AWS_BUCKET_NAME
let tester = require('greenlock-challenge-test');
let challenger = require('./index').create({
accessKeyId: accessKeyId
, secretAccessKey: secretAccessKey
, regionName: regionName
, bucketName: bucketName
, directory: 'acme-challenge/'
, debug: true
});
let domain = 'example.com';
// All of these tests can pass locally, standalone without any ACME integration.
tester.test('http-01', domain, challenger).then(() => {
console.info("Test completed successfully.");
}).catch((err) => {
console.error(err.message);
throw err;
});