hevinhsu commented on code in PR #8702:
URL: https://github.com/apache/ozone/pull/8702#discussion_r2176254051


##########
hadoop-ozone/dist/src/main/smoketest/s3/commonawslib.robot:
##########
@@ -191,3 +191,21 @@ Revoke S3 secrets
     Execute and Ignore Error             ozone s3 revokesecret -y -u testuser
     Execute and Ignore Error             ozone s3 revokesecret -y -u testuser2
 
+Get bucket owner
+    [arguments]    ${bucket}
+    ${owner} =     Execute     ozone sh bucket info /s3v/${bucket} | jq -r 
'.owner'
+    [return]       ${owner}
+
+Execute AWSS3APICli using bucket ownership verification
+    [arguments]    ${command}    ${expected_bucket_owner}    
${expected_source_bucket_owner}=${EMPTY}
+    ${cmd} =       Set Variable           ${command} --expected-bucket-owner 
${expected_bucket_owner}
+    ${cmd} =       Set Variable If        '${expected_source_bucket_owner}' != 
'${EMPTY}'    ${cmd} --expected-source-bucket-owner 
${expected_source_bucket_owner}    ${cmd}
+    ${result} =    Execute AWSS3APICli    ${cmd}

Review Comment:
   Thanks for pointing this out to help make the tests more robust. I'll add 
assertions for the positive test scenarios.
   
   Regarding merging "Execute AWSS3APICli using bucket ownership verification" 
and "Execute AWSS3APICli and failed bucket ownership verification", I think 
combining them might introduce more duplicated checking logic in the caller 
function. If we want to verify not only the bucket ownership verification but 
also other aspects, we can leverage existing APIs like "AWSS3APICli and 
checkrc" instead.
   
   If needed, feel free to let me know and I can combine these two functions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to