forked from kdby-io/greenlock-storage-s3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
30 lines (25 loc) · 800 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
console.log("Testing the challenge.");
require("dotenv").config();
let accessKeyId = process.env.AWS_ACCESS_KEY_ID
, secretAccessKey = process.env.AWS_SECRET_ACCESS_KEY
, bucketRegion = process.env.AWS_BUCKET_REGION
, bucketName = process.env.AWS_BUCKET_NAME
, endpoint = process.env.ENDPOINT;
let tester = require("greenlock-store-test");
let store = require("./index").create({
accessKeyId
, secretAccessKey
, bucketRegion
, bucketName
, endpoint
, configDir: "acme/"
, accountsDir: "accounts/"
, debug: true
});
// All of these tests can pass locally, standalone without any ACME integration.
tester.test(store).then(() => {
console.info("Test completed successfully.");
}).catch((err) => {
console.error(err.message);
throw err;
});