added debug functionality.

This commit is contained in:
Cyrille 2019-05-08 14:15:46 +01:00
parent 6490072a62
commit 499062de8c
2 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,12 @@ module.exports.create = (createOptions) => {
const options = Object.assign({}, defaultOptions, createOptions);
if (!options.debug) {
console = console || {};
console.log = () => { };
console.error = () => { };
}
AWS.config.update({
region: options.bucketRegion
, credentials: new AWS.Credentials({

View File

@ -16,11 +16,12 @@ let store = require('./index').create({
, bucketName: bucketName
, 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 successfully completed");
console.info("Test completed successfully.");
}).catch((err) => {
console.error(err.message);
throw err;