Skip to content

Commit fc3948c

Browse files
committed
fixups post reviews
1 parent cd3af77 commit fc3948c

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

tests/functional/aws-node-sdk/test/mdSearch/basicSearch.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const {
55
DeleteObjectsCommand,
66
} = require('@aws-sdk/client-s3');
77
const s3Client = require('./utils/s3SDK');
8-
98
const { runAndCheckSearch, runIfMongo } = require('./utils/helpers');
109

1110
const objectKey = 'findMe';
@@ -18,21 +17,19 @@ const updatedUserMetadata = { food: 'cake' };
1817
runIfMongo('Basic search', () => {
1918
const bucketName = `basicsearchmebucket${Date.now()}`;
2019

21-
before(done => {
22-
s3Client.send(new CreateBucketCommand({ Bucket: bucketName }))
23-
.then(() => s3Client.send(new PutObjectCommand({
24-
Bucket: bucketName,
25-
Key: objectKey,
26-
Metadata: userMetadata,
27-
Tagging: objectTagData,
28-
})))
29-
.then(() => s3Client.send(new PutObjectCommand({
30-
Bucket: bucketName,
31-
Key: hiddenKey,
32-
Tagging: hiddenTagData,
33-
})))
34-
.then(() => done())
35-
.catch(done);
20+
before(async () => {
21+
await s3Client.send(new CreateBucketCommand({ Bucket: bucketName }));
22+
await s3Client.send(new PutObjectCommand({
23+
Bucket: bucketName,
24+
Key: objectKey,
25+
Metadata: userMetadata,
26+
Tagging: objectTagData,
27+
}));
28+
await s3Client.send(new PutObjectCommand({
29+
Bucket: bucketName,
30+
Key: hiddenKey,
31+
Tagging: hiddenTagData,
32+
}));
3633
});
3734

3835
after(async () => {

tests/functional/aws-node-sdk/test/mdSearch/utils/helpers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ testUtils.runAndCheckSearch = (s3Client, bucketName, encodedSearch, listVersions
9090
}
9191
} else {
9292
if (testResult && typeof testResult === 'object' && testResult.code) {
93-
// This was expected to be an error, but we got success
9493
done(new Error('Expected error but got success'));
9594
}
9695
if (testResult) {

0 commit comments

Comments
 (0)