Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11702. Merge test_bucket_encryption into robot compatibility test #7451

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions hadoop-ozone/dist/src/main/compose/xcompat/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ _kinit() {
}

_init() {
container=scm
errose28 marked this conversation as resolved.
Show resolved Hide resolved
_kinit
execute_command_in_container ${container} ozone freon ockg -n1 -t1 -p warmup
}
Expand All @@ -74,29 +75,21 @@ _read() {
compatibility/read.robot
}

test_bucket_encryption() {
_kinit
execute_robot_test ${container} -N "xcompat-cluster-${cluster_version}-client-${client_version}" -v SUFFIX:${client_version} security/bucket-encryption.robot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this robot file now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was also thinking about that. Since xcompat also exercises "current client" with "current cluster", testing the same in ozonesecure is redundant. (We can apply this to other functional tests later.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

test_cross_compatibility() {
echo "Starting ${cluster_version} cluster with COMPOSE_FILE=${COMPOSE_FILE}"

OZONE_KEEP_RESULTS=true start_docker_env

execute_command_in_container kms hadoop key create ${OZONE_BUCKET_KEY_NAME}
new_client test_bucket_encryption

container=scm _kinit
execute_command_in_container scm ozone freon ockg -n1 -t1 -p warmup
_init

new_client _write
new_client _read ${current_version}

for client_version in "$@"; do
client="old_client_${client_version//./_}"

old_client test_bucket_encryption

old_client _write
old_client _read ${client_version}

Expand Down
3 changes: 3 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ${SUFFIX} ${EMPTY}
Key Can Be Read
Key Should Match Local File /vol1/bucket1/key-${SUFFIX} ${TESTFILE}

Encrypted Key Can Be Read
Key Should Match Local File /vol1/encrypted-${SUFFIX}/key ${TESTFILE}

Dir Can Be Listed
Execute ozone fs -ls o3fs://bucket1.vol1/dir-${SUFFIX}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,16 @@ Suite Setup Create Local Test File

*** Variables ***
${SUFFIX} ${EMPTY}
${KEY_NAME} key1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. Can we rename this to ENC_KEY or something similar? Out of context it looks like this is the name that will be used for the actual data key written.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but it will affect few other files outside of xcompat.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.



*** Test Cases ***
Create Encrypted Bucket
Execute ozone sh bucket create -k ${KEY_NAME} /vol1/encrypted-${SUFFIX}

Create Key in Encrypted Bucket
Execute ozone sh key put /vol1/encrypted-${SUFFIX}/key ${TESTFILE}

Key Can Be Written
Create Key /vol1/bucket1/key-${SUFFIX} ${TESTFILE}

Expand Down