-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENG-52244]Upgrade collectors aws-sdk version from v2 to v3 and rewri…
…te functionality and test cases (#354) * Upgrade aws-sdk v2 to v3 with callback and fixed the functionality
- Loading branch information
1 parent
4a10d4d
commit 54b903c
Showing
4 changed files
with
208 additions
and
128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const sinon = require('sinon'); | ||
const sandbox = sinon.createSandbox(); | ||
function mock(service, methodName, callback) { | ||
return sandbox.stub(service.prototype, methodName).callsFake(callback); | ||
} | ||
|
||
function restore(serviceName, methodName) { | ||
serviceName.prototype[methodName].restore(); | ||
} | ||
|
||
module.exports = { | ||
mock: mock, | ||
restore: restore | ||
}; |
Oops, something went wrong.