Skip to content

Commit

Permalink
Fix flaky s3 listbuckets test (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
oleiade authored Jul 29, 2024
1 parent 2119312 commit 2791a75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/internal/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export async function s3TestSuite(data) {
s3Client.endpoint = s3Endpoint

await asyncDescribe('s3.listBuckets', async (expect) => {
let buckets;
let buckets
// Act
buckets = await s3Client.listBuckets()

// Assert
expect(buckets).to.be.an('array')
// Because other tests may have created buckets, we can't assume there is only one bucket.
expect(buckets).to.have.lengthOf.above(1)
expect(buckets).to.have.lengthOf.least(1)
expect(buckets.map((b) => b.name)).to.contain(data.s3.testBucketName)
})

Expand Down

0 comments on commit 2791a75

Please sign in to comment.