Skip to content

Commit

Permalink
Fix async bug in cred check callback tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Jan 24, 2024
1 parent e0e43ed commit 364eb79
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/banner/check-creds-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ test('Credential checks (async)', async t => {
reset(t)
})

test('Credential checks (callback)', t => {
t.plan(2)
test('Credential checks (callback, via env)', t => {
t.plan(1)

// Count on aws-lite finding creds (via env)
process.env.AWS_ACCESS_KEY_ID = 'yo'
Expand All @@ -62,7 +62,10 @@ test('Credential checks (callback)', t => {
if (err) t.fail(err)
else t.pass('No credential loading error reported')
})
})

test('Credential checks (callback failure, via profile)', t => {
t.plan(1)
// Fail a cred check
reset(t)
process.env.AWS_PROFILE = 'random_profile_name_that_does_not_exist'
Expand Down

0 comments on commit 364eb79

Please sign in to comment.