sodonnel commented on a change in pull request #3030:
URL: https://github.com/apache/ozone/pull/3030#discussion_r799368977



##########
File path: hadoop-ozone/dist/src/main/smoketest/ec/basic.robot
##########
@@ -0,0 +1,105 @@
+# 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 EC shell commands
+Library             OperatingSystem
+Resource            ../commonlib.robot
+Suite Setup         Generate prefix
+
+*** Variables ***
+${SCM}       scm
+
+*** Keywords ***
+
+Generate prefix
+    ${random} =         Generate Random String  5  [NUMBERS]
+    Set Suite Variable  ${prefix}  ${random}
+    Execute             dd if=/dev/urandom of=/tmp/1mb bs=1048576 count=1
+    Execute             dd if=/dev/urandom of=/tmp/2mb bs=1048576 count=2
+    Execute             dd if=/dev/urandom of=/tmp/3mb bs=1048576 count=3
+    Execute             dd if=/dev/urandom of=/tmp/100mb bs=1048576 count=100
+
+*** Test Cases ***
+
+Test Bucket Creation
+    ${result} =     Execute             ozone sh volume create /${prefix}vol1
+                    Should not contain  ${result}       Failed
+    ${result} =     Execute             ozone sh bucket create 
/${prefix}vol1/${prefix}ratis
+                    Should not contain  ${result}       Failed
+    ${result} =     Execute             ozone sh bucket list /${prefix}vol1 | 
jq -r '.[] | select(.name | contains("${prefix}ratis")) | 
.replicationConfig.replicationType'
+                    Should contain      ${result}       RATIS
+    ${result} =     Execute             ozone sh bucket create --replication 
rs-3-2-1024k --type EC /${prefix}vol1/${prefix}ec
+                    Should not contain  ${result}       Failed
+    ${result} =     Execute             ozone sh bucket list /${prefix}vol1 | 
jq -r '.[] | select(.name | contains("${prefix}ec")) | 
.replicationConfig.replicationType, .replicationConfig.codec, 
.replicationConfig.data, .replicationConfig.parity, 
.replicationConfig.ecChunkSize'
+                    Should Match Regexp      ${result}       ^(?m)EC$
+                    Should Match Regexp      ${result}       ^(?m)RS$
+                    Should Match Regexp      ${result}       ^(?m)3$
+                    Should Match Regexp      ${result}       ^(?m)2$
+                    Should Match Regexp      ${result}       ^(?m)1048576$

Review comment:
       How do you think this would work? We made need to check for RS-3-2 or 
RS-6-3, or a different value from 1048576 in some future tests.
   
   Something like:
   ```
   Verify Key EC Replication Config
   [arguments]         ${encoding}   ${data}    ${parity}   ${chunkSize}
   ...
   ```
   
   Would probably work.




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

Reply via email to