gl-store-s3.js/test.js

28 lines
742 B
JavaScript
Raw Normal View History

2019-05-08 23:01:23 +00:00
console.log("Testing the challenge.");
2019-05-08 13:05:05 +00:00
2019-05-08 23:01:23 +00:00
require("dotenv").config();
2019-05-08 13:05:05 +00:00
let accessKeyId = process.env.AWS_ACCESS_KEY_ID
2019-05-08 23:01:23 +00:00
, secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY
, regionName = process.env.AWS_BUCKET_REGION
2019-05-08 23:12:15 +00:00
, bucketName = process.env.AWS_BUCKET_NAME;
2019-05-08 13:05:05 +00:00
2019-05-08 23:01:23 +00:00
let tester = require("greenlock-store-test");
2019-05-08 13:05:05 +00:00
2019-05-08 23:01:23 +00:00
let store = require("./index").create({
2019-05-08 23:12:15 +00:00
accessKeyId
, secretAccessKey
, regionName
, bucketName
2019-05-08 23:01:23 +00:00
, configDir: "acme/"
, accountsDir: "accounts/"
2019-05-08 13:15:46 +00:00
, debug: true
2019-05-08 13:05:05 +00:00
});
// All of these tests can pass locally, standalone without any ACME integration.
tester.test(store).then(() => {
2019-05-08 13:15:46 +00:00
console.info("Test completed successfully.");
2019-05-08 13:05:05 +00:00
}).catch((err) => {
console.error(err.message);
throw err;
});