gl-store-s3.js/test.js

28 lines
788 B
JavaScript
Raw Normal View History

2019-05-08 11:04:12 +00:00
console.log('Testing the strategy.');
2019-05-08 13:05:05 +00:00
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-store-test');
let store = require('./index').create({
accessKeyId: accessKeyId
, secretAccessKey: secretAccessKey
, regionName: regionName
, bucketName: bucketName
, 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;
});