adoroszlai commented on code in PR #4634: URL: https://github.com/apache/ozone/pull/4634#discussion_r1182195726
########## hadoop-ozone/dist/src/main/smoketest/upgrade/snapshot.robot: ########## @@ -0,0 +1,74 @@ +# 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 +Library BuiltIn +Resource ../commonlib.robot +Resource ../s3/commonawslib.robot +Test Timeout 5 minutes + +*** Variables *** + + +*** Test Cases *** +Create snapshot + [Tags] snapshot-support + ${output} = Execute ozone sh volume create vol + Should not contain ${output} Failed + ${output} = Execute ozone sh bucket create /vol/bucket2 + Should not contain ${output} Failed + ${output} = Execute ozone sh snapshot create /vol/bucket2 snapshot1 + Should not contain ${output} Failed + Execute and checkrc echo "key created using Ozone Shell" > /tmp/sourcekey 0 + Execute ozone sh key put /vol/bucket2/key1 /tmp/sourcekey + Execute ozone sh snapshot create /vol/bucket2 snapshot2 + +Create snapshot in non-supported ozone version + [Tags] snapshot-non-support + ${output} = Execute and checkrc ozone sh bucket create /vol/bucket2 255 Review Comment: Is `bucket create` command enough to verify snapshot creation is not allowed? ########## hadoop-ozone/dist/src/main/compose/upgrade/upgrades/non-rolling-upgrade/callbacks/common/callback.sh: ########## @@ -35,12 +35,26 @@ validate() { execute_robot_test "$SCM" -v PREFIX:"$1" ${@:2} upgrade/validate.robot } +## @description Validates that if cluster supports snapshot feature. +## @param Whether the snapshot feature should be supported in cluster. +## @param All parameters after the first one are passed directly to the robot command, +## see https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#all-command-line-options +validate_snapshot_support() { + TEST_TAG="snapshot-non-support" + if [ "$1" = "true" ]; + then + TEST_TAG="snapshot-support" + fi; + execute_robot_test --include $TEST_TAG -v ${@:2} upgrade/snapshot.robot Review Comment: Snapshot-related validation should be added to specific version (1.4.0), not `common`. Upgrade test for 1.2.1 -> 1.3.0 would fail if we expected snapshots to work in the latter. See for example EC, which was added in 1.3.0: https://github.com/apache/ozone/blob/df4df2037143728c0b2e52844bc8f1ffbbae79f5/hadoop-ozone/dist/src/main/compose/upgrade/upgrades/non-rolling-upgrade/callbacks/1.3.0/callback.sh#L20-L30 ########## hadoop-ozone/dist/src/main/smoketest/upgrade/snapshot.robot: ########## @@ -0,0 +1,74 @@ +# 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 +Library BuiltIn +Resource ../commonlib.robot +Resource ../s3/commonawslib.robot Review Comment: Are S3 libraries really needed for this test? -- 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]
