-
Notifications
You must be signed in to change notification settings - Fork 620
HDDS-11848. Serialisation bug in Recon's listKeys API #7524
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
Changes from 2 commits
dbbd84a
abd70ba
29ad408
5034a4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,8 @@ ${API_ENDPOINT_URL} ${ENDPOINT_URL}/api/v1 | |
| ${ADMIN_API_ENDPOINT_URL} ${API_ENDPOINT_URL}/containers | ||
| ${UNHEALTHY_ENDPOINT_URL} ${API_ENDPOINT_URL}/containers/unhealthy | ||
| ${NON_ADMIN_API_ENDPOINT_URL} ${API_ENDPOINT_URL}/clusterState | ||
| ${VOLUME} vol1 | ||
| ${BUCKET} bucket1 | ||
|
|
||
| *** Keywords *** | ||
| Check if Recon picks up container from OM | ||
|
|
@@ -57,6 +59,21 @@ Check http return code | |
| Should contain ${result} 200 | ||
| END | ||
|
|
||
| Check if the listKeys api responds OK | ||
| [Arguments] ${volume} ${bucket} | ||
| ${result} = Curl "${API_ENDPOINT_URL}/keys/listKeys?startPrefix=/${volume}/${bucket}&limit=1000" | ||
| Should contain ${result} "OK" | ||
| Should contain ${result} "keys" | ||
| Should contain ${result} "${volume}" | ||
| Should contain ${result} "${bucket}" | ||
|
|
||
| Curl | ||
| [Arguments] ${url} | ||
| ${curl_command} = Set Variable curl -LSs ${url} | ||
| Run Keyword if '${SECURITY_ENABLED}' == 'true' Set Variable ${curl_command} curl --negotiate -u : -LSs ${url} | ||
| ${result} = Execute ${curl_command} | ||
| [Return] ${result} | ||
|
|
||
| *** Test Cases *** | ||
| Check if Recon picks up OM data | ||
| Execute ozone sh volume create recon | ||
|
|
@@ -136,3 +153,13 @@ Check normal api access | |
|
|
||
| kinit as non admin | ||
| Check http return code ${NON_ADMIN_API_ENDPOINT_URL} 200 | ||
|
|
||
| Check listKeys api works | ||
| kinit as ozone admin | ||
| # Create volume and bucket | ||
| Execute ozone sh volume create ${VOLUME} | ||
| Execute ozone sh bucket create ${VOLUME}/${BUCKET} | ||
| Freon OCKG n=2 args=-s 10 -v ${VOLUME} -b ${BUCKET} | ||
|
|
||
| # Wait until Recon picks up the keys | ||
| Wait Until Keyword Succeeds 90sec 10sec Check if the listKeys api responds OK ${VOLUME} ${BUCKET} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks a lot @siddhantsangwan for adding the test. Unfortunately it fails with: Instead of starting from scratch, we could add the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I've the updated the PR with the suggested change. |
||
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.
Set Variablereturns the value, does not modify its first argument.This can be fixed by using
Set Variable If:But other test cases use
curl --negotiate -u :unconditionally, so maybe we don't need the conditional logic at all.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 added code to kinit and to use curl directly without any conditions. It should hopefully pass now; I checked out a separate branch with the same code and ran CI successfully on my fork (just for testing): https://github.com/siddhantsangwan/ozone/actions/runs/12157989638