xBis7 commented on code in PR #5350:
URL: https://github.com/apache/ozone/pull/5350#discussion_r1380684851


##########
hadoop-ozone/dist/src/main/smoketest/omha/data-creation-before-om-bootstrap.robot:
##########
@@ -0,0 +1,96 @@
+# 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       Smoke test for creating data needed for om bootstrap load 
test.
+Resource            ../commonlib.robot
+Test Timeout        5 minutes
+Test Setup          Run Keyword if    '${SECURITY_ENABLED}' == 'true'    Kinit 
test user     testuser     testuser.keytab
+
+*** Variables ***
+${TMP_FILE}         tmp.txt
+${VOLUME}
+${BUCKET}
+${SNAP_1}
+${SNAP_2}
+${KEY_PREFIX}
+${KEY_1}
+${KEY_2}
+
+*** Keywords ***
+Create volume and bucket
+    [arguments]         ${volume}           ${bucket}
+    ${vol_res} =        Execute             ozone sh volume create /${volume}
+                        Should Be Empty     ${vol_res}
+    ${bucket_res} =     Execute             ozone sh bucket create 
/${volume}/${bucket}
+                        Should Be Empty     ${bucket_res}
+
+Create tmp file
+    [arguments]         ${file_name}
+    ${create_res} =     Execute             touch ${file_name}
+                        Should Be Empty     ${create_res}
+    ${ls_grep_res} =    Execute             ls -lah | grep '${file_name}'
+                        Should contain      ${ls_grep_res}      ${file_name}
+
+Delete tmp file
+    [arguments]         ${file_name}
+    Execute             rm ${file_name}
+    ${file_exists} =    Execute             [[ -f ${file_name} ]] && echo 
"File exists" || echo "File doesn't exist"
+                        Should contain      ${file_exists}      File doesn't 
exist
+
+Create a key and set contents same as the keyName
+    [arguments]         ${volume}           ${bucket}      ${key_prefix}       
${key_name}         ${tmp_file}
+    Execute             echo "${key_prefix}/${key_name}" > ${tmp_file}
+    ${key_res} =        Execute             ozone sh key put 
/${volume}/${bucket}/${key_prefix}/${key_name} ${tmp_file}
+                        Should Be Empty     ${key_res}
+    ${key_cat_res} =    Execute             ozone sh key cat 
/${volume}/${bucket}/${key_prefix}/${key_name}

Review Comment:
   We just want to read the contents of the key. We set the contents to the key 
name and we want to see that we don't have just the metadata but the actual 
key. `ozone sh key info` would give us the metadata from RocksDB.



##########
hadoop-ozone/dist/src/main/smoketest/omha/data-creation-before-om-bootstrap.robot:
##########
@@ -0,0 +1,96 @@
+# 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       Smoke test for creating data needed for om bootstrap load 
test.
+Resource            ../commonlib.robot
+Test Timeout        5 minutes
+Test Setup          Run Keyword if    '${SECURITY_ENABLED}' == 'true'    Kinit 
test user     testuser     testuser.keytab
+
+*** Variables ***
+${TMP_FILE}         tmp.txt
+${VOLUME}
+${BUCKET}
+${SNAP_1}
+${SNAP_2}
+${KEY_PREFIX}
+${KEY_1}
+${KEY_2}
+
+*** Keywords ***
+Create volume and bucket
+    [arguments]         ${volume}           ${bucket}
+    ${vol_res} =        Execute             ozone sh volume create /${volume}
+                        Should Be Empty     ${vol_res}
+    ${bucket_res} =     Execute             ozone sh bucket create 
/${volume}/${bucket}
+                        Should Be Empty     ${bucket_res}
+
+Create tmp file
+    [arguments]         ${file_name}
+    ${create_res} =     Execute             touch ${file_name}
+                        Should Be Empty     ${create_res}
+    ${ls_grep_res} =    Execute             ls -lah | grep '${file_name}'
+                        Should contain      ${ls_grep_res}      ${file_name}
+
+Delete tmp file
+    [arguments]         ${file_name}
+    Execute             rm ${file_name}
+    ${file_exists} =    Execute             [[ -f ${file_name} ]] && echo 
"File exists" || echo "File doesn't exist"
+                        Should contain      ${file_exists}      File doesn't 
exist
+
+Create a key and set contents same as the keyName
+    [arguments]         ${volume}           ${bucket}      ${key_prefix}       
${key_name}         ${tmp_file}
+    Execute             echo "${key_prefix}/${key_name}" > ${tmp_file}
+    ${key_res} =        Execute             ozone sh key put 
/${volume}/${bucket}/${key_prefix}/${key_name} ${tmp_file}
+                        Should Be Empty     ${key_res}
+    ${key_cat_res} =    Execute             ozone sh key cat 
/${volume}/${bucket}/${key_prefix}/${key_name}

Review Comment:
   We want to read the contents of the key. We set the contents to the key name 
and we want to see that we don't have just the metadata but the actual key. 
`ozone sh key info` would give us the metadata from RocksDB.



-- 
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]

Reply via email to