Skip to content

Commit

Permalink
HDDS-11134. Create compatibility test for FSO bucket usage
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai committed Jul 10, 2024
1 parent 4d29b6c commit 8664d79
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
13 changes: 11 additions & 2 deletions hadoop-ozone/dist/src/main/compose/xcompat/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,21 @@ _init() {
}

_write() {
execute_robot_test ${container} -N "xcompat-cluster-${cluster_version}-client-${client_version}-write" -v SUFFIX:${client_version} compatibility/write.robot
execute_robot_test ${container} -N "xcompat-cluster-${cluster_version}-client-${client_version}-write" \
-v CLIENT_VERSION:${client_version} \
-v CLUSTER_VERSION:${cluster_version} \
-v SUFFIX:${client_version} \
compatibility/write.robot
}

_read() {
local data_version="$1"
execute_robot_test ${container} -N "xcompat-cluster-${cluster_version}-client-${client_version}-read-${data_version}" -v SUFFIX:${data_version} compatibility/read.robot
execute_robot_test ${container} -N "xcompat-cluster-${cluster_version}-client-${client_version}-read-${data_version}" \
-v CLIENT_VERSION:${client_version} \
-v CLUSTER_VERSION:${cluster_version} \
-v DATA_VERSION:${data_version} \
-v SUFFIX:${data_version} \
compatibility/read.robot
}

test_cross_compatibility() {
Expand Down
10 changes: 9 additions & 1 deletion hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,12 @@ Dir Can Be Listed
File Can Be Get
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}
[teardown] Execute rm -f /tmp/file-${SUFFIX}

FSO Bucket Can Be Read
Skip If '${DATA_VERSION}' < '${FSO_VERSION}' Skipped write test case
Skip If '${CLIENT_VERSION}' < '${FSO_VERSION}' Client does not support FSO
Skip If '${CLUSTER_VERSION}' < '${FSO_VERSION}' Cluster does not support FSO
Execute ozone fs -get ofs://om/vol1/fso-bucket-${SUFFIX}/dir/subdir/file ${TEMP_DIR}/
Execute diff -q ${TESTFILE} ${TEMP_DIR}/file
[teardown] Execute rm -f ${TEMP_DIR}/file
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Resource ../ozone-lib/shell.robot

*** Variables ***
${SUFFIX} ${EMPTY}
${FSO_VERSION} 1.3.0


*** Keywords ***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ Dir Can Be Created

File Can Be Put
Execute ozone fs -put ${TESTFILE} o3fs://bucket1.vol1/dir-${SUFFIX}/file-${SUFFIX}

FSO Bucket Can Be Created and Used
Skip If '${CLIENT_VERSION}' < '${FSO_VERSION}' Client does not support FSO
Skip If '${CLUSTER_VERSION}' < '${FSO_VERSION}' Cluster does not support FSO
Execute ozone sh bucket create --layout FILE_SYSTEM_OPTIMIZED /vol1/fso-bucket-${SUFFIX}
Execute ozone fs -mkdir -p ofs://om/vol1/fso-bucket-${SUFFIX}/dir/subdir
Execute ozone fs -put ${TESTFILE} ofs://om/vol1/fso-bucket-${SUFFIX}/dir/subdir/file

0 comments on commit 8664d79

Please sign in to comment.