-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CS-1264 Improved Logging Messages for lambda functions
CS-1264 Greatly increase logging in Lambda Functions CS-1264 Log lambda return values
- Loading branch information
1 parent
be01e15
commit 9fa87fd
Showing
19 changed files
with
299 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Your installation or use of this SugarCRM file is subject to the applicable | ||
* terms available at | ||
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. | ||
* If you do not agree to all of the applicable terms or do not have the | ||
* authority to bind the entity as an authorized representative, then do not | ||
* install or use this SugarCRM file. | ||
* | ||
* Copyright (C) SugarCRM Inc. All rights reserved. | ||
*/ | ||
const strUtils = require('../../../src/utils/string-utils.js'); | ||
|
||
describe('generateMessage', function() { | ||
test.each([ | ||
{ | ||
template: 'Single ${} test', | ||
filler: 'dog', | ||
expected: 'Single dog test' | ||
}, | ||
{ | ||
template: 'Multiples ${} ${} test', | ||
filler: ['dog', 'cat'], | ||
expected: 'Multiples dog cat test' | ||
}, | ||
{ | ||
template: 'Mismatched ${} ${} ${} too few fillers', | ||
filler: ['dog', 'cat'], | ||
expected: 'Mismatched dog cat ${} too few fillers' | ||
}, | ||
{ | ||
template: 'Mismatch ${} too many fillers', | ||
filler: ['dog', 'cat'], | ||
expected: 'Mismatch dog too many fillers' | ||
} | ||
])('should fill the template string as expected', (values) => { | ||
let actual = strUtils.generateMessage(values.template, values.filler); | ||
expect(actual).toEqual(values.expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Your installation or use of this SugarCRM file is subject to the applicable | ||
* terms available at | ||
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/. | ||
* If you do not agree to all of the applicable terms or do not have the | ||
* authority to bind the entity as an authorized representative, then do not | ||
* install or use this SugarCRM file. | ||
* | ||
* Copyright (C) SugarCRM Inc. All rights reserved. | ||
*/ | ||
|
||
module.exports = { | ||
/** | ||
* Success messages | ||
*/ | ||
LAMBDA_FUNCTION_SUCCESS: 'Lambda Function Completed Successfully' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.