adoroszlai commented on code in PR #3629:
URL: https://github.com/apache/ozone/pull/3629#discussion_r938600304


##########
hadoop-ozone/dist/src/main/smoketest/s3/bucketcreateperformance.robot:
##########
@@ -0,0 +1,43 @@
+# 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       S3 gateway test with aws cli
+Library             OperatingSystem
+Library             String
+Library             BuiltIn
+Resource            ../commonlib.robot
+Resource            ../ozone-lib/freon.robot
+Test Timeout        5 minutes
+
+*** Variables ***
+${testuser}          testuser
+
+*** Keywords ***
+Set Access Key and Id
+    ${result} =         Execute    ozone s3 getsecret
+    ${accessKey} =      Get Regexp Matches         ${result}     
(?<=awsAccessKey=).*
+    ${secret} =         Get Regexp Matches         ${result}     
(?<=awsSecret=).*
+    ${accessKey} =      Set Variable               ${accessKey[0]}
+    ${secret} =         Set Variable               ${secret[0]}
+    Set Environment Variable    AWS_SECRET_ACCESS_KEY  ${secret}
+    Set Environment Variable    AWS_ACCESS_KEY_ID  ${accessKey}
+
+*** Test Cases ***
+S3g bucket creation performance
+    Kinit test user    ${testuser}    ${testuser}.keytab
+    Set Access Key and Id

Review Comment:
   Test is executed in both secure and unsecure environments, it needs to work 
in both.  This is handled by:
   
   
https://github.com/apache/ozone/blob/51897d4aa104d028e5c504ffa8795a5c20191b5b/hadoop-ozone/dist/src/main/smoketest/s3/commonawslib.robot#L60-L82
   
   All that code shouldn't be duplicated in each test.  Common test setup can 
be performed by adding this in the `Settings` section:
   
   
https://github.com/apache/ozone/blob/51897d4aa104d028e5c504ffa8795a5c20191b5b/hadoop-ozone/dist/src/main/smoketest/s3/bucketcreate.robot#L23
   
   I also suggest renaming `bucketcreateperformance.robot` to a more generic 
`freon.robot`, so we can add other Freon smoketest here later.



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