diff --git a/hadoop-ozone/dist/src/main/compose/testlib.sh b/hadoop-ozone/dist/src/main/compose/testlib.sh index b122479d3db1..981536a92cef 100755 --- a/hadoop-ozone/dist/src/main/compose/testlib.sh +++ b/hadoop-ozone/dist/src/main/compose/testlib.sh @@ -22,7 +22,7 @@ RESULT_DIR_INSIDE="/tmp/smoketest/$(basename "$COMPOSE_ENV_NAME")/result" SMOKETEST_DIR_INSIDE="${OZONE_DIR:-/opt/hadoop}/smoketest" OM_HA_PARAM="" -if [[ -n "${OM_SERVICE_ID}" ]]; then +if [[ -n "${OM_SERVICE_ID}" ]] && [[ "${OM_SERVICE_ID}" != "om" ]]; then OM_HA_PARAM="--om-service-id=${OM_SERVICE_ID}" else OM_SERVICE_ID=om diff --git a/hadoop-ozone/dist/src/main/compose/upgrade/test.sh b/hadoop-ozone/dist/src/main/compose/upgrade/test.sh index 7284bf71f70a..661b9d2812c7 100644 --- a/hadoop-ozone/dist/src/main/compose/upgrade/test.sh +++ b/hadoop-ozone/dist/src/main/compose/upgrade/test.sh @@ -45,7 +45,8 @@ source "${COMPOSE_DIR}/../testlib.sh" # prepare pre-upgrade cluster start_docker_env -execute_robot_test scm topology/loaddata.robot +execute_robot_test scm -v PREFIX:pre freon/generate.robot +execute_robot_test scm -v PREFIX:pre freon/validate.robot KEEP_RUNNING=false stop_docker_env # run upgrade scripts @@ -63,7 +64,10 @@ source "${COMPOSE_DIR}/../testlib.sh" # re-start cluster with new version and check after upgrade export OZONE_KEEP_RESULTS=true start_docker_env -execute_robot_test scm topology/readdata.robot +execute_robot_test scm -v PREFIX:pre freon/validate.robot +# TODO can be enabled with HDDS-4562: +# execute_robot_test scm -v PREFIX:post freon/generate.robot +# execute_robot_test scm -v PREFIX:post freon/validate.robot stop_docker_env generate_report diff --git a/hadoop-ozone/dist/src/main/smoketest/freon/freon.robot b/hadoop-ozone/dist/src/main/smoketest/freon/freon.robot deleted file mode 100644 index 74c1a15d34a0..000000000000 --- a/hadoop-ozone/dist/src/main/smoketest/freon/freon.robot +++ /dev/null @@ -1,37 +0,0 @@ -# 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 *** -Documentation Smoketest ozone cluster startup -Library OperatingSystem -Resource ../commonlib.robot -Test Timeout 5 minutes - -*** Test Cases *** -Freon Randomkey Generator - ${result} = Execute ozone freon rk ${OM_HA_PARAM} --num-of-volumes=1 --num-of-buckets=1 --num-of-keys=1 --num-of-threads=1 - Wait Until Keyword Succeeds 3min 10sec Should contain ${result} Number of Keys added: 1 - -Freon Ozone Key Generator - ${result} = Execute ozone freon ockg ${OM_HA_PARAM} -t=1 -n=1 - Wait Until Keyword Succeeds 3min 10sec Should contain ${result} Successful executions: 1 - -Freon OM Key Generator - ${result} = Execute ozone freon omkg ${OM_HA_PARAM} -t=1 -n=1 - Wait Until Keyword Succeeds 3min 10sec Should contain ${result} Successful executions: 1 - -Freon OM Bucket Generator - ${result} = Execute ozone freon ombg ${OM_HA_PARAM} -t=1 -n=1 - Wait Until Keyword Succeeds 3min 10sec Should contain ${result} Successful executions: 1 \ No newline at end of file diff --git a/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot b/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot new file mode 100644 index 000000000000..de1df101b286 --- /dev/null +++ b/hadoop-ozone/dist/src/main/smoketest/freon/generate.robot @@ -0,0 +1,35 @@ +# 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 *** +Documentation Test freon data generation commands +Resource ../lib/os.robot +Test Timeout 5 minutes + +*** Variables *** +${PREFIX} ${EMPTY} + +*** 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 + +OM Key Generator + ${result} = Execute ozone freon omkg ${OM_HA_PARAM} -t=1 -n=1 -p omkg${PREFIX} + Should contain ${result} Successful executions: 1 + +OM Bucket Generator + ${result} = Execute ozone freon ombg ${OM_HA_PARAM} -t=1 -n=1 -p ombg${PREFIX} + Should contain ${result} Successful executions: 1 diff --git a/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot b/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot new file mode 100644 index 000000000000..06896546fa89 --- /dev/null +++ b/hadoop-ozone/dist/src/main/smoketest/freon/validate.robot @@ -0,0 +1,27 @@ +# 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 *** +Documentation Test freon data validation commands +Resource ../lib/os.robot +Test Timeout 5 minutes + +*** Variables *** +${PREFIX} ${EMPTY} + +*** 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