-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-10828. S3 robot tests should cover both OBS and FSO buckets #6706
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 all commits
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 |
|---|---|---|
|
|
@@ -25,10 +25,11 @@ Suite Setup Setup s3 tests | |
| *** Variables *** | ||
| ${ENDPOINT_URL} http://s3g:9878 | ||
| ${BUCKET} generated | ||
| ${BUCKET1} generated | ||
|
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. Same for this variable as well, And all other files having BUCKET1 can be changed to something more sensible |
||
|
|
||
| *** Test Cases *** | ||
|
|
||
| *** Keywords *** | ||
| File upload and directory list | ||
| [Arguments] ${BUCKET} | ||
| Execute date > /tmp/testfile | ||
| ${result} = Execute AWSS3Cli cp /tmp/testfile s3://${BUCKET} | ||
| Should contain ${result} upload | ||
|
|
@@ -48,9 +49,21 @@ File upload and directory list | |
| Should contain ${result} file | ||
|
|
||
| File upload with special chars | ||
| [Arguments] ${BUCKET} | ||
| Execute date > /tmp/testfile | ||
| ${result} = Execute AWSS3Cli cp /tmp/testfile s3://${BUCKET}/specialchars/a+b | ||
| Should contain ${result} upload | ||
| ${result} = Execute AWSS3Cli ls s3://${BUCKET}/specialchars/ | ||
| Should not contain ${result} 'a b' | ||
| Should contain ${result} a+b | ||
|
|
||
| *** Test Cases *** | ||
| File upload and directory list with OBS | ||
| File upload and directory list ${BUCKET} | ||
| File upload and directory list with FSO | ||
| File upload and directory list ${BUCKET1} | ||
|
|
||
| File upload with special chars with OBS | ||
| File upload with special chars ${BUCKET} | ||
| File upload with special chars with FSO | ||
| File upload with special chars ${BUCKET1} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,9 @@ ${ENDPOINT_URL} http://s3g:9878 | |
| ${OZONE_S3_HEADER_VERSION} v4 | ||
| ${OZONE_S3_SET_CREDENTIALS} true | ||
| ${BUCKET} generated | ||
| ${BUCKET1} generated | ||
| ${BUCKET_LAYOUT} OBJECT_STORE | ||
| ${BUCKET_LAYOUT1} FILE_SYSTEM_OPTIMIZED | ||
|
Comment on lines
+26
to
+28
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. The naming of ${BUCKET_LAYOUT} and ${BUCKET_LAYOUT1} can also be changed to ${BUCKET_LAYOUT_OBS} and ${BUCKET_LAYOUT_FSO} respectively.
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. +1 |
||
| ${KEY_NAME} key1 | ||
| ${OZONE_S3_TESTS_SET_UP} ${FALSE} | ||
| ${OZONE_AWS_ACCESS_KEY_ID} ${EMPTY} | ||
|
|
@@ -141,7 +143,8 @@ Setup s3 tests | |
| Run Keyword Generate random prefix | ||
| Run Keyword Install aws cli | ||
| Run Keyword if '${OZONE_S3_SET_CREDENTIALS}' == 'true' Setup v4 headers | ||
| Run Keyword if '${BUCKET}' == 'generated' Create generated bucket ${BUCKET_LAYOUT} | ||
| Run Keyword if '${BUCKET}' == 'generated' Create generated bucket with OBS ${BUCKET_LAYOUT} | ||
| Run Keyword if '${BUCKET1}' == 'generated' Create generated bucket with FSO ${BUCKET_LAYOUT1} | ||
|
Comment on lines
+146
to
+147
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. Referring to the below comment, the BUCKET_LAYOUT variables wouldn't need to be passed here. |
||
| Run Keyword if '${BUCKET}' == 'link' Setup links for S3 tests | ||
| Run Keyword if '${BUCKET}' == 'encrypted' Create encrypted bucket | ||
| Run Keyword if '${BUCKET}' == 'erasure' Create EC bucket | ||
|
|
@@ -154,11 +157,16 @@ Setup links for S3 tests | |
| Execute ozone sh bucket create --layout ${BUCKET_LAYOUT} o3://${OM_SERVICE_ID}/legacy/source-bucket | ||
| Create link link | ||
|
|
||
| Create generated bucket | ||
| Create generated bucket with OBS | ||
| [Arguments] ${layout}=OBJECT_STORE | ||
| ${BUCKET} = Create bucket with layout ${layout} | ||
| Set Global Variable ${BUCKET} | ||
|
|
||
| Create generated bucket with FSO | ||
| [Arguments] ${layout}=FILE_SYSTEM_OPTIMIZED | ||
| ${BUCKET1} = Create bucket with layout ${layout} | ||
| Set Global Variable ${BUCKET1} | ||
|
|
||
|
Comment on lines
+160
to
+169
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. As we have 2 different key words for creating FSO and OBS buckets, there is no need to pass an argument to these keywords. |
||
| Create encrypted bucket | ||
| Return From Keyword if '${SECURITY_ENABLED}' == 'false' | ||
| ${exists} = Bucket Exists o3://${OM_SERVICE_ID}/s3v/encrypted | ||
|
|
||
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.
Could we improve the naming of variables here? BUCKET1 is very ambiguous, it can be changed to BUCKET_FSO or anything similar.
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.
+1