Skip to content

Commit

Permalink
chore: mock aws credentials during test executions
Browse files Browse the repository at this point in the history
  • Loading branch information
joelcox22 committed Jun 19, 2021
1 parent 1445dd8 commit 041d397
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ module.exports = {
'^.+\\.ts$': 'ts-jest'
},
testPathIgnorePatterns: ['/node_modules/', '/lib/'],
collectCoverageFrom: ['src/*']
collectCoverageFrom: ['src/*'],
setupFiles: ['./jest.setup-env.js']
}
5 changes: 5 additions & 0 deletions jest.setup-env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Mock values for aws access keys, so that aws-sdk does not try to fetch
// credential data from instance metadata endpoints during test ececutions

process.env.AWS_ACCESS_KEY_ID = 'AKIAMOCKEDKEY'
process.env.AWS_SECRET_ACCESS_KEY = 'this-does-not-matter'

0 comments on commit 041d397

Please sign in to comment.