-
Notifications
You must be signed in to change notification settings - Fork 253
Improvement/cldsrv 724-backbeat-related-functional-tests #5985
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
Open
benzekrimaha
wants to merge
36
commits into
improvement/CLDSRV-724-service-get-related-functional-tests
Choose a base branch
from
improvement/CLDSRV-724-backbeat-related-functional-tests
base: improvement/CLDSRV-724-service-get-related-functional-tests
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
a1fff68
backbeat functional tests migration
benzekrimaha 91fe932
aws-node-sdk bucket functional tests migration
benzekrimaha 7408990
aws-node-sdk multiple backend tests migration
benzekrimaha 0ff38c1
raw-node gcp object and bucket tests migration
benzekrimaha 1c371b1
routBackbeat migration adaptation
benzekrimaha 03dc295
aws-node-sdk test utils migration
benzekrimaha ac83417
raw-node rest of code migration
benzekrimaha b07e438
rest of code migration
benzekrimaha c2f4c3a
deps install
benzekrimaha 0be0667
add ceph logs in CI for debug purposes in future
benzekrimaha b534e28
commenting out ceph tests from CI
benzekrimaha 3699de7
getlocation functional aws-node-sdk test bucket lint
benzekrimaha b3e16fb
multiple backend aws-node-sdk lint fixup
benzekrimaha 536ef7f
arsenal rebump
benzekrimaha 1af0814
new bucket logging and rate limit tests migration
benzekrimaha 1ce0df8
new bucket logging and rate limit tests migration
benzekrimaha cede1b9
new bucket logging and rate limit tests migration
benzekrimaha 553c156
new bucket logging and rate limit tests migration
benzekrimaha 768b263
latest arsenal bump
benzekrimaha 5313153
fixups post reviews
benzekrimaha eee9699
bump arsenal with latest fixups
benzekrimaha 1d9770c
bump arsenal with latest fixups
benzekrimaha 7e3a81d
bump arsenal with latest fixups
benzekrimaha 4f3c944
bump arsenal with latest fixups
benzekrimaha f9fbace
bump arsenal with latest fixups
benzekrimaha ce181cb
bump arsenal with latest fixups
benzekrimaha 42ed39e
bump arsenal with latest fixups
benzekrimaha 908ba8d
bump arsenal with latest fixups
benzekrimaha e30a7b0
bump arsenal with latest fixups
benzekrimaha c73a9c1
bump arsenal with latest fixups
benzekrimaha 31d137c
bump arsenal with latest fixups
benzekrimaha 80e3e93
fixups post reviews
benzekrimaha 82472d0
fixups post reviews
benzekrimaha 74d7db3
fixups post reviews
benzekrimaha 1783b09
fixups post reviews
benzekrimaha df480a2
fixups post reviews
benzekrimaha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,46 @@ | ||
| const { S3 } = require('aws-sdk'); | ||
| const { S3Client, ListObjectsCommand } = require('@aws-sdk/client-s3'); | ||
| const { NodeHttpHandler } = require('@smithy/node-http-handler'); | ||
| const http = require('http'); | ||
|
|
||
| const config = { | ||
| sslEnabled: false, | ||
| endpoint: 'http://127.0.0.1:8000', | ||
| signatureCache: false, | ||
| signatureVersion: 'v4', | ||
| region: 'us-east-1', | ||
| s3ForcePathStyle: true, | ||
| accessKeyId: 'accessKey1', | ||
| secretAccessKey: 'verySecretKey1', | ||
| forcePathStyle: true, | ||
| credentials: { | ||
| accessKeyId: 'accessKey1', | ||
| secretAccessKey: 'verySecretKey1', | ||
| }, | ||
| requestHandler: new NodeHttpHandler({ | ||
| httpAgent: new http.Agent({ keepAlive: false }), | ||
| }), | ||
| }; | ||
| const s3Client = new S3(config); | ||
|
|
||
| const encodedSearch = | ||
| encodeURIComponent('x-amz-meta-color="blue"'); | ||
| const req = s3Client.listObjects({ Bucket: 'bucketname' }); | ||
| const s3Client = new S3Client(config); | ||
|
|
||
| const encodedSearch = encodeURIComponent('x-amz-meta-color="blue"'); | ||
|
|
||
| const command = new ListObjectsCommand({ Bucket: 'bucketname' }); | ||
|
|
||
| command.middlewareStack.add( | ||
| next => async args => { | ||
| if (args.request && args.request.path) { | ||
| // eslint-disable-next-line no-param-reassign | ||
| args.request.path = `${args.request.path}?search=${encodedSearch}`; | ||
| } | ||
| return next(args); | ||
| }, | ||
| { | ||
| step: 'build', | ||
| name: 'addSearchParameter', | ||
| priority: 'high' | ||
| } | ||
| ); | ||
|
|
||
| // the build event | ||
| req.on('build', () => { | ||
| req.httpRequest.path = `${req.httpRequest.path}?search=${encodedSearch}`; | ||
| }); | ||
| req.on('success', res => { | ||
| process.stdout.write(`Result ${res.data}`); | ||
| }); | ||
| req.on('error', err => { | ||
| process.stdout.write(`Error ${err}`); | ||
| }); | ||
| req.send(); | ||
| // Send command and handle response | ||
| s3Client.send(command) | ||
| .then(data => { | ||
| process.stdout.write(`Result ${JSON.stringify(data)}`); | ||
| }) | ||
| .catch(err => { | ||
| process.stdout.write(`Error ${err}`); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How come we have this in sdkv3 migration ? Is it because you found a bug/flaky test and needed this to fix it ?
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.
yes , this was found in tests flakiness and was added to fix it