This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 14fa87c  HDDS-6270. Use a dedicated file instead of /etc/passwd for 
xcompat acceptance test (#3050)
14fa87c is described below

commit 14fa87ca5ce7415a9aed23ea61e4aa4c81f02c78
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Feb 8 13:16:19 2022 +0100

    HDDS-6270. Use a dedicated file instead of /etc/passwd for xcompat 
acceptance test (#3050)
---
 .../dist/src/main/smoketest/compatibility/read.robot     |  9 ++++++---
 .../smoketest/compatibility/{write.robot => setup.robot} | 16 ++++++----------
 .../dist/src/main/smoketest/compatibility/write.robot    |  7 +++++--
 3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot 
b/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
index fc133c1..511679c 100644
--- a/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
@@ -16,18 +16,21 @@
 *** Settings ***
 Documentation       Read Compatibility
 Resource            ../ozone-lib/shell.robot
+Resource            setup.robot
 Test Timeout        5 minutes
+Suite Setup         Create Local Test File
 
 *** Variables ***
 ${SUFFIX}    ${EMPTY}
 
 *** Test Cases ***
 Key Can Be Read
-    Key Should Match Local File    /vol1/bucket1/key-${SUFFIX}    /etc/passwd
+    Key Should Match Local File    /vol1/bucket1/key-${SUFFIX}    ${TESTFILE}
 
 Dir Can Be Listed
     Execute    ozone fs -ls o3fs://bucket1.vol1/dir-${SUFFIX}
 
 File Can Be Get
-    Execute    ozone fs -get o3fs://bucket1.vol1/dir-${SUFFIX}/passwd 
/tmp/passwd-${SUFFIX}
-    [teardown]    Execute    rm /tmp/passwd-${SUFFIX}
+    Execute    ozone fs -get o3fs://bucket1.vol1/dir-${SUFFIX}/file-${SUFFIX} 
/tmp/
+    Execute    diff -q ${TESTFILE} /tmp/file-${SUFFIX}
+    [teardown]    Execute    rm /tmp/file-${SUFFIX}
diff --git a/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot 
b/hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
similarity index 72%
copy from hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
copy to hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
index f5c9201..ae765f2 100644
--- a/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/compatibility/setup.robot
@@ -14,19 +14,15 @@
 # limitations under the License.
 
 *** Settings ***
-Documentation       Write Compatibility
+Documentation       Setup for Compatibility Tests
+Library             OperatingSystem
 Resource            ../ozone-lib/shell.robot
-Test Timeout        5 minutes
 
 *** Variables ***
 ${SUFFIX}    ${EMPTY}
 
-*** Test Cases ***
-Key Can Be Written
-    Create Key    /vol1/bucket1/key-${SUFFIX}    /etc/passwd
 
-Dir Can Be Created
-    Execute    ozone fs -mkdir o3fs://bucket1.vol1/dir-${SUFFIX}
-
-File Can Be Put
-    Execute    ozone fs -put /etc/passwd o3fs://bucket1.vol1/dir-${SUFFIX}/
+*** Keywords ***
+Create Local Test File
+    Set Suite Variable    ${TESTFILE}    /tmp/test-data-${SUFFIX}.txt
+    Create File    ${TESTFILE}    Compatibility Test
diff --git a/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot 
b/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
index f5c9201..4c611d4 100644
--- a/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot
@@ -16,17 +16,20 @@
 *** Settings ***
 Documentation       Write Compatibility
 Resource            ../ozone-lib/shell.robot
+Resource            setup.robot
 Test Timeout        5 minutes
+Suite Setup         Create Local Test File
 
 *** Variables ***
 ${SUFFIX}    ${EMPTY}
 
+
 *** Test Cases ***
 Key Can Be Written
-    Create Key    /vol1/bucket1/key-${SUFFIX}    /etc/passwd
+    Create Key    /vol1/bucket1/key-${SUFFIX}    ${TESTFILE}
 
 Dir Can Be Created
     Execute    ozone fs -mkdir o3fs://bucket1.vol1/dir-${SUFFIX}
 
 File Can Be Put
-    Execute    ozone fs -put /etc/passwd o3fs://bucket1.vol1/dir-${SUFFIX}/
+    Execute    ozone fs -put ${TESTFILE} 
o3fs://bucket1.vol1/dir-${SUFFIX}/file-${SUFFIX}

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to