-
Notifications
You must be signed in to change notification settings - Fork 252
Improvement/cldsrv 724 versionning related functional tests #5978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: improvement/CLDSRV-724-bucket-related-functional-tests
Are you sure you want to change the base?
Conversation
❌ 54 Tests Failed:
View the top 3 failed test(s) by shortest run time
View the full list of 45 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
834eefe to
92f36a8
Compare
f5f1929 to
84f6930
Compare
92f36a8 to
c1fb5b5
Compare
d0f6428 to
a680a09
Compare
2ce7329 to
9bdb532
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one question around listing and special characters, otherwise lgtm
| return s3.putObject({ | ||
| it('put objects inside bucket', async () => { | ||
| for (const obj of objects) { | ||
| // Handle versioning state changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Handle versioning state changes |
| await s3.send(new PutBucketVersioningCommand(params)); | ||
| } | ||
|
|
||
| // Handle object operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Handle object operations |
|
|
||
| // Handle object operations | ||
| if (obj.value === null) { | ||
| // For delete operations, we need to check the response headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // For delete operations, we need to check the response headers |
| it('should list object versions', async () => { | ||
| const key = 'key'; | ||
|
|
||
| // Put first version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Put first version |
| })); | ||
| const versionId1 = putResult1.VersionId; | ||
|
|
||
| // Put second version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Put second version |
| })); | ||
| const versionId2 = putResult2.VersionId; | ||
|
|
||
| // List versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // List versions |
| Body: 'body1', | ||
| })); | ||
|
|
||
| // Delete object (creates delete marker) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Delete object (creates delete marker) |
(same for other comments in the file)
| { name: 'Pâtisserie=中文-español-English', value: 'foo' }, | ||
| { name: 'Pâtisserie=中文-español-English', value: 'bar' }, | ||
| { name: 'notes/spring/1.txt', value: 'qux' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we stopping supporting object names like these? There is an advantage of keeping the special characters, as we do listing, it's to ensure it works well even when the object names are uncommon
| afterEach(async () => { | ||
| await removeAllVersions({ Bucket: bucketName }); | ||
| await s3.send(new DeleteBucketCommand({ Bucket: bucketName })); | ||
| // Create objects in batches of 20 concurrently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Create objects in batches of 20 concurrently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just some nits but good 👏
| const config = getConfig('default', { signatureVersion: 'v4' }); | ||
| const s3 = new S3(config); | ||
| const config = getConfig('default'); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
| }; | ||
|
|
||
| async function customS3Request(CommandClass, params, buildParams) { | ||
| const customS3 = new S3Client({ ...config }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation issue
| function checkOneVersion(s3, bucket, versionId) { | ||
| return s3Client.send(new ListObjectVersionsCommand({ Bucket: bucket })).then(data => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| function checkOneVersion(s3, bucket, versionId) { | |
| return s3Client.send(new ListObjectVersionsCommand({ Bucket: bucket })).then(data => { | |
| async function checkOneVersion(s3, bucket, versionId) { | |
| return await s3Client.send(new ListObjectVersionsCommand({ Bucket: bucket })).then(data => { |
This will keep the checkOneVersion in the stack trace. It's a "good" practice for async/await. But nits
|
|
||
| // empty and delete bucket after testing if bucket exists | ||
| afterEach(done => { | ||
| afterEach(done => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| afterEach(done => { | |
| afterEach(done => { |
indentation ? Weird that the CI pass 😬
| return d; | ||
| } | ||
|
|
||
| function dateConvert(d) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This helper seems really useful ?
| VersioningConfiguration: versioningSuspended, | ||
| })); | ||
|
|
||
| // List versions to check null version exists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would delete comments as they just describe the test (same before)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
Issue: CLDSRV-724