Skip to content

Commit adb7ac5

Browse files
committed
post reviews fixups
1 parent 1b3237e commit adb7ac5

File tree

3 files changed

+149
-199
lines changed

3 files changed

+149
-199
lines changed

tests/functional/aws-node-sdk/lib/utility/bucket-util.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class BucketUtility {
1616
if (unauthenticated) {
1717
this.s3 = new S3Client({
1818
...s3Config,
19+
maxAttempts: 0,
1920
credentials: { accessKeyId: '', secretAccessKey: '' },
2021
forcePathStyle: true,
2122
signer: { sign: async request => request },
@@ -109,6 +110,7 @@ class BucketUtility {
109110
Bucket: bucketName,
110111
Key: object.Key,
111112
VersionId: object.VersionId,
113+
...(BypassGovernanceRetention && { BypassGovernanceRetention }),
112114
}))
113115
.then(() => object)
114116
)
@@ -118,6 +120,8 @@ class BucketUtility {
118120
this.s3.send(new DeleteObjectCommand({
119121
Bucket: bucketName,
120122
Key: object.Key,
123+
VersionId: object.VersionId,
124+
...(BypassGovernanceRetention && { BypassGovernanceRetention }),
121125
}))
122126
.then(() => object)
123127
)
@@ -128,19 +132,23 @@ class BucketUtility {
128132
Bucket: bucketName,
129133
Key: object.Key,
130134
VersionId: object.VersionId,
135+
...(BypassGovernanceRetention && { BypassGovernanceRetention }),
131136
}))
132137
.then(() => object)
133-
))
134-
));
138+
)
139+
)
140+
)
141+
);
135142
}
136143

137144
emptyMany(bucketNames) {
138-
const promises = bucketNames.map(
139-
bucketName => this.empty(bucketName)
145+
const promises = bucketNames.map(
146+
bucketName => this.empty(bucketName)
140147
);
141148

142149
return Promise.all(promises);
143150
}
151+
144152
emptyIfExists(bucketName) {
145153
return this.bucketExists(bucketName)
146154
.then(exists => {

0 commit comments

Comments
 (0)