This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 191bb5f111 HDDS-8219. Run HA secure tests from s3g container (#4444)
191bb5f111 is described below

commit 191bb5f11155f3b77ad2b361cd91dcdde61cb1e1
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Mar 25 10:24:34 2023 +0100

    HDDS-8219. Run HA secure tests from s3g container (#4444)
---
 .../dist/src/main/compose/ozonesecure-ha/test.sh      | 19 ++++++++++---------
 .../dist/src/main/smoketest/basic/links.robot         | 11 ++++++-----
 hadoop-ozone/dist/src/main/smoketest/commonlib.robot  | 15 ++++++++++-----
 3 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh 
b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh
index 9e1fcba1f1..d082206f6e 100755
--- a/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh
+++ b/hadoop-ozone/dist/src/main/compose/ozonesecure-ha/test.sh
@@ -33,13 +33,13 @@ start_docker_env
 
 execute_command_in_container kms hadoop key create ${OZONE_BUCKET_KEY_NAME}
 
-execute_robot_test ${SCM} kinit.robot
+execute_robot_test s3g kinit.robot
 
-execute_robot_test ${SCM} freon
+execute_robot_test s3g freon
 
-execute_robot_test ${SCM} -v SCHEME:o3fs -v BUCKET_TYPE:link -N 
ozonefs-o3fs-link ozonefs/ozonefs.robot
+execute_robot_test s3g -v SCHEME:o3fs -v BUCKET_TYPE:link -N ozonefs-o3fs-link 
ozonefs/ozonefs.robot
 
-execute_robot_test ${SCM} basic/links.robot
+execute_robot_test s3g basic/links.robot
 
 exclude=""
 for bucket in encrypted link; do
@@ -48,15 +48,16 @@ for bucket in encrypted link; do
   exclude="--exclude no-bucket-type"
 done
 
-execute_robot_test ${SCM} admincli
+execute_robot_test s3g admincli
 
-execute_robot_test ${SCM} omha/om-leader-transfer.robot
-execute_robot_test ${SCM} scmha/scm-leader-transfer.robot
+execute_robot_test s3g omha/om-leader-transfer.robot
+execute_robot_test s3g scmha/scm-leader-transfer.robot
 
-execute_robot_test ${SCM} httpfs
+execute_robot_test s3g httpfs
 
 export SCM=scm2.org
-execute_robot_test ${SCM} admincli
+execute_robot_test s3g admincli
+
 stop_docker_env
 
 generate_report
diff --git a/hadoop-ozone/dist/src/main/smoketest/basic/links.robot 
b/hadoop-ozone/dist/src/main/smoketest/basic/links.robot
index 1057a75365..dc46e76e6d 100644
--- a/hadoop-ozone/dist/src/main/smoketest/basic/links.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/basic/links.robot
@@ -42,11 +42,12 @@ Setup ACL tests
     Execute             ozone sh bucket link ${source}/readable-bucket 
${target}/readable-link
     Execute             ozone sh bucket link ${source}/readable-bucket 
${target}/unreadable-link
     Execute             ozone sh bucket link ${source}/unreadable-bucket 
${target}/link-to-unreadable-bucket
-    Execute             ozone sh volume addacl --acl 
user:testuser2/[email protected]:r ${target}
-    Execute             ozone sh volume addacl --acl 
user:testuser2/[email protected]:rl ${source}
-    Execute             ozone sh bucket addacl --acl 
user:testuser2/[email protected]:rl ${source}/readable-bucket
-    Execute             ozone sh bucket addacl --acl 
user:testuser2/[email protected]:r ${target}/readable-link
-    Execute             ozone sh bucket addacl --acl 
user:testuser2/[email protected]:r ${target}/link-to-unreadable-bucket
+    ${principal} =      Get test user principal    testuser2
+    Execute             ozone sh volume addacl --acl user:${principal}:r 
${target}
+    Execute             ozone sh volume addacl --acl user:${principal}:rl 
${source}
+    Execute             ozone sh bucket addacl --acl user:${principal}:rl 
${source}/readable-bucket
+    Execute             ozone sh bucket addacl --acl user:${principal}:r 
${target}/readable-link
+    Execute             ozone sh bucket addacl --acl user:${principal}:r 
${target}/link-to-unreadable-bucket
 
 Can follow link with read access
     Execute             kdestroy
diff --git a/hadoop-ozone/dist/src/main/smoketest/commonlib.robot 
b/hadoop-ozone/dist/src/main/smoketest/commonlib.robot
index 41a1e28467..62ea760efc 100644
--- a/hadoop-ozone/dist/src/main/smoketest/commonlib.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/commonlib.robot
@@ -26,15 +26,20 @@ ${OM_HA_PARAM}       ${EMPTY}
 ${OM_SERVICE_ID}     om
 
 *** Keywords ***
+Get test user principal
+    [arguments]         ${user}
+    ${instance} =       Execute                    hostname | sed 
's/scm[0-9].org/scm/'
+    [return]            ${user}/${instance}@EXAMPLE.COM
+
 Kinit HTTP user
-    ${hostname} =       Execute                    hostname | sed 
's/scm[0-9].org/scm/'
-    Wait Until Keyword Succeeds      2min       10sec      Execute            
kinit -k HTTP/${hostname}@EXAMPLE.COM -t /etc/security/keytabs/HTTP.keytab
+    ${principal} =      Get test user principal    HTTP
+    Wait Until Keyword Succeeds      2min       10sec      Execute            
kinit -k -t /etc/security/keytabs/HTTP.keytab ${principal}
 
 Kinit test user
     [arguments]                      ${user}       ${keytab}
-    ${instance} =       Execute                    hostname | sed 
's/scm[0-9].org/scm/'
-    Set Suite Variable  ${TEST_USER}               
${user}/${instance}@EXAMPLE.COM
-    Wait Until Keyword Succeeds      2min       10sec      Execute            
kinit -k ${user}/${instance}@EXAMPLE.COM -t /etc/security/keytabs/${keytab}
+    ${TEST_USER} =      Get test user principal    ${user}
+    Set Suite Variable  ${TEST_USER}
+    Wait Until Keyword Succeeds      2min       10sec      Execute            
kinit -k -t /etc/security/keytabs/${keytab} ${TEST_USER}
 
 Access should be denied
     [arguments]    ${command}


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

Reply via email to