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 909b0d2  HDDS-6079. Replace Freon RK with OCKG/OCKV in acceptance 
tests (#2916)
909b0d2 is described below

commit 909b0d23f7898b253618db0308debb1e0211b81c
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Mar 19 06:59:40 2022 +0100

    HDDS-6079. Replace Freon RK with OCKG/OCKV in acceptance tests (#2916)
---
 .../dist/src/main/compose/ozone-topology/test.sh   |  6 --
 hadoop-ozone/dist/src/main/compose/ozone/test.sh   |  2 +
 .../main/smoketest/auditparser/auditparser.robot   | 22 ++++----
 .../dist/src/main/smoketest/basic/basic.robot      |  9 +--
 .../dist/src/main/smoketest/freon/generate.robot   | 19 ++-----
 .../dist/src/main/smoketest/freon/remove.robot     | 21 ++-----
 .../dist/src/main/smoketest/freon/validate.robot   | 13 +----
 .../dist/src/main/smoketest/omha/om-prepare.robot  |  3 +-
 .../dist/src/main/smoketest/ozone-lib/freon.robot  | 65 ++++++++++++++++++++++
 .../dist/src/main/smoketest/recon/recon-api.robot  |  6 +-
 .../dist/src/main/smoketest/spnego/web.robot       |  4 --
 11 files changed, 101 insertions(+), 69 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/compose/ozone-topology/test.sh 
b/hadoop-ozone/dist/src/main/compose/ozone-topology/test.sh
index 392112b..c738c3f 100755
--- a/hadoop-ozone/dist/src/main/compose/ozone-topology/test.sh
+++ b/hadoop-ozone/dist/src/main/compose/ozone-topology/test.sh
@@ -23,12 +23,6 @@ source "$COMPOSE_DIR/../testlib.sh"
 
 start_docker_env 4
 
-#Due to the limitation of the current auditparser test, it should be the
-#first test in a clean cluster.
-
-#Disabling for now, audit parser tool during parse getting exception.
-#execute_robot_test om auditparser
-
 execute_robot_test scm basic/basic.robot
 
 execute_robot_test scm topology/cli.robot
diff --git a/hadoop-ozone/dist/src/main/compose/ozone/test.sh 
b/hadoop-ozone/dist/src/main/compose/ozone/test.sh
index acc18a5..b015d4c 100755
--- a/hadoop-ozone/dist/src/main/compose/ozone/test.sh
+++ b/hadoop-ozone/dist/src/main/compose/ozone/test.sh
@@ -31,6 +31,8 @@ start_docker_env
 execute_robot_test scm lib
 execute_robot_test scm ozone-lib
 
+execute_robot_test om auditparser
+
 execute_robot_test scm basic
 
 execute_robot_test scm gdpr
diff --git a/hadoop-ozone/dist/src/main/smoketest/auditparser/auditparser.robot 
b/hadoop-ozone/dist/src/main/smoketest/auditparser/auditparser.robot
index 9c97fbb..55e4ed8 100644
--- a/hadoop-ozone/dist/src/main/smoketest/auditparser/auditparser.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/auditparser/auditparser.robot
@@ -18,12 +18,13 @@ Documentation       Smoketest ozone cluster startup
 Library             OperatingSystem
 Library             BuiltIn
 Resource            ../commonlib.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 
 *** Variables ***
 ${user}              hadoop
-${count}             4
-${auditworkdir}      /tmp/
+${buckets}           5
+${auditworkdir}      /tmp
 
 *** Keywords ***
 Set username
@@ -31,14 +32,15 @@ Set username
     Set Suite Variable     ${user}         testuser/${hostname}@EXAMPLE.COM
     [return]               ${user}
 
-*** Test Cases ***
-Initiating freon to generate data
-    ${result} =        Execute              ozone freon randomkeys 
--num-of-volumes 5 --num-of-buckets 5 --num-of-keys 5 --num-of-threads 1
-                       Wait Until Keyword Succeeds      3min       10sec     
Should contain   ${result}   Number of Keys added: 125
-                       Should Not Contain               ${result}  ERROR
+Create data
+    Freon OMBG    prefix=auditparser    n=${buckets}
+    Freon OCKG    prefix=auditparser    n=100
 
+*** Test Cases ***
 Testing audit parser
-    ${logdir} =        Get Environment Variable      HADOOP_LOG_DIR     
/var/log/hadoop
+    [Setup]            Create data
+
+    ${logdir} =        Get Environment Variable      OZONE_LOG_DIR     
/var/log/ozone
     ${logfile} =       Execute              ls -t "${logdir}" | grep om-audit 
| head -1
                        Execute              ozone auditparser 
"${auditworkdir}/audit.db" load "${logdir}/${logfile}"
     ${result} =        Execute              ozone auditparser 
"${auditworkdir}/audit.db" template top5cmds
@@ -48,7 +50,7 @@ Testing audit parser
                        Should Contain       ${result}  ${user}
     ${result} =        Execute              ozone auditparser 
"${auditworkdir}/audit.db" query "select count(*) from audit where 
op='CREATE_VOLUME' and RESULT='SUCCESS'"
     ${result} =        Convert To Number     ${result}
-                       Should be true       ${result}>${count}
+                       Should be true       ${result}>=1
     ${result} =        Execute              ozone auditparser 
"${auditworkdir}/audit.db" query "select count(*) from audit where 
op='CREATE_BUCKET' and RESULT='SUCCESS'"
     ${result} =        Convert To Number     ${result}
-                       Should be true       ${result}>${count}
+                       Should be true       ${result}>=${buckets}
diff --git a/hadoop-ozone/dist/src/main/smoketest/basic/basic.robot 
b/hadoop-ozone/dist/src/main/smoketest/basic/basic.robot
index bf70837..a9d5d17 100644
--- a/hadoop-ozone/dist/src/main/smoketest/basic/basic.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/basic/basic.robot
@@ -17,6 +17,7 @@
 Documentation       Smoketest ozone cluster startup
 Library             OperatingSystem
 Resource            ../commonlib.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 
 *** Variables ***
@@ -30,8 +31,8 @@ Check webui static resources
     ${result} =        Execute                curl --negotiate -u : -s -I 
http://${SCM}:9876/static/bootstrap-3.4.1/js/bootstrap.min.js
                        Should contain         ${result}    200
 
-Start freon testing
+Basic Freon smoketest
     Run Keyword if    '${SECURITY_ENABLED}' == 'true'    Kinit test user     
testuser     testuser.keytab
-    ${result} =        Execute              ozone freon randomkeys 
--num-of-volumes 5 --num-of-buckets 5 --num-of-keys 5 --num-of-threads 1 
--replication-type RATIS --factor THREE --validate-writes
-                       Wait Until Keyword Succeeds      3min       10sec     
Should contain   ${result}   Number of Keys added: 125
-                       Should Contain                   ${result}  Status: 
Success
+    ${random} =        Generate Random String    10
+    Freon OCKG    prefix=${random}
+    Freon OCKV    prefix=${random}
diff --git a/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot 
b/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot
index 1cb76ae..4611a3c 100644
--- a/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot
@@ -15,30 +15,21 @@
 
 *** Settings ***
 Documentation       Test freon data generation commands
-Resource            ../lib/os.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 
 *** Variables ***
 ${PREFIX}    ${EMPTY}
 
-*** Keywords ***
-DN Chunk Generator
-    Return From Keyword If    '${SECURITY_ENABLED}' == 'true'
-    ${result} =        Execute          ozone freon dcg -t1 -n100 -p 
dcg${PREFIX}
-                       Should contain   ${result}   Successful executions: 100
-
 *** Test Cases ***
 Ozone Client Key Generator
-    ${result} =        Execute          ozone freon ockg ${OM_HA_PARAM} -t=1 
-n=1 -p ockg${PREFIX}
-                       Should contain   ${result}   Successful executions: 1
+    Freon OCKG    prefix=ockg${PREFIX}
 
 OM Key Generator
-    ${result} =        Execute          ozone freon omkg ${OM_HA_PARAM} -t=1 
-n=1 -p omkg${PREFIX}
-                       Should contain   ${result}   Successful executions: 1
+    Freon OMKG    prefix=omkg${PREFIX}
 
 OM Bucket Generator
-    ${result} =        Execute          ozone freon ombg ${OM_HA_PARAM} -t=1 
-n=1 -p ombg${PREFIX}
-                       Should contain   ${result}   Successful executions: 1
+    Freon OMBG    prefix=ombg${PREFIX}
 
 DN Chunk Generator
-    DN Chunk Generator
+    Freon DCG     prefix=dcg${PREFIX}    n=100
diff --git a/hadoop-ozone/dist/src/main/smoketest/freon/remove.robot 
b/hadoop-ozone/dist/src/main/smoketest/freon/remove.robot
index 087a3bd..8b9e845 100644
--- a/hadoop-ozone/dist/src/main/smoketest/freon/remove.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/freon/remove.robot
@@ -15,7 +15,7 @@
 
 *** Settings ***
 Documentation       Test freon data remove commands
-Resource            ../lib/os.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 
 *** Variables ***
@@ -24,20 +24,9 @@ ${OMBR_PREFIX}    ombr
 
 *** Test Cases ***
 Ozone Client Key Remover
-    [Setup]            Ozone Client Key Generator For Remover    ${OCKR_PREFIX}
-    ${result} =        Execute                ozone freon ockr ${OM_HA_PARAM} 
-t=1 -n=1 -p ${OCKR_PREFIX}
-                       Should contain         ${result}   Successful 
executions: 1
+    [Setup]    Freon OCKG    prefix=${OCKR_PREFIX}
+    Freon OCKR    prefix=${OCKR_PREFIX}
 
 OM Bucket Remover
-    [Setup]            OM Bucket Generator For Remover           ${OMBR_PREFIX}
-    ${result} =        Execute                ozone freon ombr ${OM_HA_PARAM} 
-t=1 -n=1 -p ${OMBR_PREFIX}
-                       Should contain         ${result}   Successful 
executions: 1
-
-*** Keywords ***
-Ozone Client Key Generator For Remover
-    [Arguments]        ${PREFIX}
-    Execute            ozone freon ockg ${OM_HA_PARAM} -t=1 -n=1 -p ${PREFIX}
-
-OM Bucket Generator For Remover
-    [Arguments]        ${PREFIX}
-    Execute            ozone freon ombg ${OM_HA_PARAM} -t=1 -n=1 -p ${PREFIX}
\ No newline at end of file
+    [Setup]    Freon OMBG    prefix=${OMBR_PREFIX}
+    Freon OMBR    prefix=${OMBR_PREFIX}
diff --git a/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot 
b/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot
index a1d6dc1..4f782a5 100644
--- a/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot
@@ -15,22 +15,15 @@
 
 *** Settings ***
 Documentation       Test freon data validation commands
-Resource            ../lib/os.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 
 *** Variables ***
 ${PREFIX}    ${EMPTY}
 
-*** Keywords ***
-DN Chunk Validator
-    Return From Keyword If    '${SECURITY_ENABLED}' == 'true'
-    ${result} =        Execute          ozone freon dcv -t1 -n100 -p 
dcg${PREFIX}
-                       Should contain   ${result}   Successful executions: 100
-
 *** Test Cases ***
 Ozone Client Key Validator
-    ${result} =        Execute          ozone freon ockv ${OM_HA_PARAM} -t=1 
-n=1 -p ockg${PREFIX}
-                       Should contain   ${result}   Successful executions: 1
+    Freon OCKV    prefix=ockg${PREFIX}
 
 DN Chunk Validator
-    DN Chunk Validator
+    Freon DCV     prefix=dcg${PREFIX}    n=100
diff --git a/hadoop-ozone/dist/src/main/smoketest/omha/om-prepare.robot 
b/hadoop-ozone/dist/src/main/smoketest/omha/om-prepare.robot
index d331438..5a2bab9 100644
--- a/hadoop-ozone/dist/src/main/smoketest/omha/om-prepare.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/omha/om-prepare.robot
@@ -19,6 +19,7 @@ Library             OperatingSystem
 Library             String
 Library             BuiltIn
 Resource            ../commonlib.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 Test Setup          Run Keyword if    '${SECURITY_ENABLED}' == 'true'    Kinit 
test user     testuser     testuser.keytab
 Suite Setup         Create Specific OM data for prepare
@@ -26,7 +27,7 @@ Suite Setup         Create Specific OM data for prepare
 *** Keywords ***
 Create Specific OM data for prepare
     # Freon data to make sure there are a reasonable number of transactions in 
the system.
-    Execute             ozone freon rk --replication-type=RATIS 
--num-of-volumes 1 --num-of-buckets 1 --num-of-keys 100
+    Freon OCKG    prefix=om-prepare    n=100
     ${random} =         Generate Random String  5  [NUMBERS]
     Set Suite Variable  ${volume_name}  ${random}-volume-for-prepare
     Set Suite Variable  ${bucket_name}  ${random}-bucket-for-prepare
diff --git a/hadoop-ozone/dist/src/main/smoketest/ozone-lib/freon.robot 
b/hadoop-ozone/dist/src/main/smoketest/ozone-lib/freon.robot
new file mode 100644
index 0000000..563af1e
--- /dev/null
+++ b/hadoop-ozone/dist/src/main/smoketest/ozone-lib/freon.robot
@@ -0,0 +1,65 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+Resource            ../lib/os.robot
+
+*** Keywords ***
+Freon DCG
+    [arguments]    ${prefix}=dcg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    Return From Keyword If    '${SECURITY_ENABLED}' == 'true'
+    ${result} =        Execute          ozone freon dcg -t ${threads} -n${n} 
-p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon DCV
+    [arguments]    ${prefix}=dcg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    Return From Keyword If    '${SECURITY_ENABLED}' == 'true'
+    ${result} =        Execute          ozone freon dcv -t ${threads} -n${n} 
-p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OCKG
+    [arguments]    ${prefix}=ockg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon ockg ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OCKV
+    [arguments]    ${prefix}=ockg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon ockv ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OCKR
+    [arguments]    ${prefix}=ockg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon ockr ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OMKG
+    [arguments]    ${prefix}=omkg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon omkg ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OMBG
+    [arguments]    ${prefix}=ombg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon ombg ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OMBV
+    [arguments]    ${prefix}=ombg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon ombv ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
+
+Freon OMBR
+    [arguments]    ${prefix}=ombg    ${n}=1    ${threads}=1    ${args}=${EMPTY}
+    ${result} =        Execute          ozone freon ombr ${OM_HA_PARAM} -t 
${threads} -n${n} -p ${prefix} ${args}
+                       Should contain   ${result}   Successful executions: ${n}
diff --git a/hadoop-ozone/dist/src/main/smoketest/recon/recon-api.robot 
b/hadoop-ozone/dist/src/main/smoketest/recon/recon-api.robot
index 1447189..094279c 100644
--- a/hadoop-ozone/dist/src/main/smoketest/recon/recon-api.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/recon/recon-api.robot
@@ -19,6 +19,7 @@ Library             OperatingSystem
 Library             String
 Library             BuiltIn
 Resource            ../commonlib.robot
+Resource            ../ozone-lib/freon.robot
 Test Timeout        5 minutes
 
 *** Variables ***
@@ -56,11 +57,8 @@ Check http return code
                         END
 
 *** Test Cases ***
-Generate Freon data
-    Run Keyword if      '${SECURITY_ENABLED}' == 'true'     Kinit test user    
 testuser     testuser.keytab
-                        Execute                             ozone freon rk 
--replication-type=RATIS --num-of-volumes 1 --num-of-buckets 1 --num-of-keys 10 
--key-size 1025
-
 Check if Recon picks up OM data
+    [Setup]    Freon OCKG    n=10    args=-s 1025 -v recon -b api
     Wait Until Keyword Succeeds     90sec      10sec        Check if Recon 
picks up container from OM
 
 Check if Recon picks up DN heartbeats
diff --git a/hadoop-ozone/dist/src/main/smoketest/spnego/web.robot 
b/hadoop-ozone/dist/src/main/smoketest/spnego/web.robot
index c500d57..17e3447 100644
--- a/hadoop-ozone/dist/src/main/smoketest/spnego/web.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/spnego/web.robot
@@ -50,10 +50,6 @@ Verify SPNEGO enabled URL
 
 
 *** Test Cases ***
-Generate Freon data
-    Run Keyword if      '${SECURITY_ENABLED}' == 'true'     Kinit test user    
 testuser     testuser.keytab
-                        Execute                             ozone freon rk 
--replication-type=RATIS --num-of-volumes 1 --num-of-buckets 1 --num-of-keys 2 
--key-size 1025
-
 Test OM portal
     Verify SPNEGO enabled URL       ${OM_URL}
 

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

Reply via email to