test: Rename logger

This commit is contained in:
Mariusz Nowak 2019-12-06 13:16:27 +01:00
parent 49ba79b14e
commit d2ef7fa7c0
No known key found for this signature in database
GPG Key ID: B1FBDA8A182B03F2

View File

@ -1,7 +1,7 @@
'use strict';
const AWS = require('aws-sdk');
const log = require('log').get('aws');
const awsLog = require('log').get('aws');
const { region, persistentRequest } = require('../misc');
function createUserPool(name, config = {}) {
@ -31,7 +31,7 @@ function deleteUserPool(name) {
}
function findUserPoolByName(name) {
log.debug('find cognito user pool by name %s', name);
awsLog.debug('find cognito user pool by name %s', name);
const cognito = new AWS.CognitoIdentityServiceProvider({ region });
const params = {
@ -44,7 +44,7 @@ function findUserPoolByName(name) {
.listUserPools(params)
.promise()
.then(result => {
log.debug('cognito.listUserPools %j', result);
awsLog.debug('cognito.listUserPools %j', result);
const matches = result.UserPools.filter(pool => pool.Name === name);
if (matches.length) {
return matches.shift();
@ -64,7 +64,7 @@ function describeUserPool(userPoolId) {
.describeUserPool({ UserPoolId: userPoolId })
.promise()
.then(result => {
log.debug('cognito.describeUserPool %s %j', userPoolId, result);
awsLog.debug('cognito.describeUserPool %s %j', userPoolId, result);
return result;
});
}