Tejaskriya commented on code in PR #8783: URL: https://github.com/apache/ozone/pull/8783#discussion_r2204261013
########## hadoop-ozone/dist/src/main/smoketest/debug/container-state-verifier.robot: ########## @@ -0,0 +1,70 @@ +# 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 container state on a UNHEALTHY, DELETED and INVALID container +Resource ../ozone-fi/BytemanKeywords.robot +Resource ozone-debug-keywords.robot +Suite Setup Write Test Keys + +*** Variables *** +${VOLUME} test-container-vol +${BUCKET} test-container-buck +${TESTFILE} test-container-key +${CHECK_TYPE} containerState +${FAULT_INJ_DATANODE} datanode1 +${FAULTY_DATANODE} ozonesecure-ha-datanode1-1.ozonesecure-ha_ozone_net + +${UNHEALTHY_RULE} /opt/hadoop/share/ozone/byteman/unhealthy-container-state.btm +${DELETED_RULE} /opt/hadoop/share/ozone/byteman/deleted-container-state.btm +${INVALID_RULE} /opt/hadoop/share/ozone/byteman/invalid-container-state.btm + +*** Keywords *** +Write Test Keys + Execute ozone sh volume create o3://${OM_SERVICE_ID}/${VOLUME} + Execute ozone sh bucket create o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET} + Execute dd if=/dev/urandom of=/tmp/${TESTFILE} bs=100MB count=1 + Execute ozone sh key put o3://${OM_SERVICE_ID}/${VOLUME}/${BUCKET}/${TESTFILE} /tmp/${TESTFILE} + +*** Test Cases *** Review Comment: We can create another key word that takes the `rule file name` and `the verification string` as arguments, and use that in the 3 tests. This would reduce the duplication between the 3 test cases -- 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: issues-unsubscr...@ozone.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org