This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch HDDS-13454
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/HDDS-13454 by this push:
new c9774947452 HDDS-13454. Add robot test and documentation for ozone
shell s3 setsecret command.
c9774947452 is described below
commit c977494745275538ab113387e7fc29e63447809d
Author: Wei-Chiu Chuang <[email protected]>
AuthorDate: Tue Jul 22 17:21:57 2025 -0700
HDDS-13454. Add robot test and documentation for ozone shell s3 setsecret
command.
Change-Id: Ib9024154b8ecf300e0f701eb7a045a662553cfea
---
.../main/smoketest/security/ozone-secure-s3.robot | 64 +++-------------------
hadoop-ozone/src/site/markdown/s3-shell.md | 17 ++++++
2 files changed, 24 insertions(+), 57 deletions(-)
diff --git
a/hadoop-ozone/dist/src/main/smoketest/security/ozone-secure-s3.robot
b/hadoop-ozone/dist/src/main/smoketest/security/ozone-secure-s3.robot
index 70bade5f1e8..c12bb152d77 100644
--- a/hadoop-ozone/dist/src/main/smoketest/security/ozone-secure-s3.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/security/ozone-secure-s3.robot
@@ -1,60 +1,10 @@
-# 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 Smoke test to start cluster with docker-compose
environments.
-Library OperatingSystem
-Library String
-Library BuiltIn
-Resource ../commonlib.robot
-Resource ../s3/commonawslib.robot
-Test Timeout 5 minutes
-
-*** Variables ***
-${ENDPOINT_URL} http://s3g:9878
-${TEMPDIR} /tmp
-${TEST_FILE} NOTICE.txt
-
-*** Keywords ***
-Setup volume names
- ${random} Generate Random String 2 [NUMBERS]
- Set Suite Variable ${volume1} fstest${random}
- Set Suite Variable ${volume2} fstest2${random}
+Suite Setup Generate S3 Credentials
+Test Teardown Cleanup S3 Credentials
+Resource ./common.robot
*** Test Cases ***
-Secure S3 test Success
- Run Keyword Setup s3 tests
- ${output} = Execute aws s3api --endpoint-url
${ENDPOINT_URL} create-bucket --bucket bucket-test123
- ${output} = Execute aws s3api --endpoint-url
${ENDPOINT_URL} list-buckets
- Should contain ${output} bucket-test123
-
-Secure S3 put-object test
- ${testFilePath} = Set Variable ${TEMPDIR}/${TEST_FILE}
- Copy File ${TEST_FILE}
${testFilePath}
- ${output} = Execute aws s3api --endpoint
${ENDPOINT_URL} put-object --bucket=bucket-test123 --key=tmp1/tmp2/NOTICE.txt
--body=${testFilePath}
- ${output} = Execute aws s3api --endpoint
${ENDPOINT_URL} list-objects --bucket=bucket-test123
- Should contain ${output}
tmp1/tmp2/NOTICE.txt
- ${output} = Execute aws s3api --endpoint
${ENDPOINT_URL} put-object --bucket=bucket-test123 --key=tmp3//tmp4/NOTICE.txt
--body=${testFilePath}
- ${output} = Execute aws s3api --endpoint
${ENDPOINT_URL} list-objects --bucket=bucket-test123
- Should contain ${output}
tmp3//tmp4/NOTICE.txt
- ${output} = Execute aws s3api --endpoint
${ENDPOINT_URL} put-object --bucket=bucket-test123 --key=//tmp5/tmp6/NOTICE.txt
--body=${testFilePath}
- ${output} = Execute aws s3api --endpoint
${ENDPOINT_URL} list-objects --bucket=bucket-test123
- Should contain ${output}
//tmp5/tmp6/NOTICE.txt
-
-Secure S3 test Failure
- Run Keyword Setup dummy credentials for S3
- ${rc} ${result} = Run And Return Rc And Output aws s3api --endpoint-url
${ENDPOINT_URL} create-bucket --bucket bucket-test123
- Should Be True ${rc} > 0
-
+SetSecret Success
+ ${output} = Execute ozone sh s3 setsecret
--secret=newsecret
+ Should Contain ${output} AWS_ACCESS_KEY_ID
+ Should Contain ${output} AWS_SECRET_ACCESS_KEY
\ No newline at end of file
diff --git a/hadoop-ozone/src/site/markdown/s3-shell.md
b/hadoop-ozone/src/site/markdown/s3-shell.md
new file mode 100644
index 00000000000..f5bd63f8353
--- /dev/null
+++ b/hadoop-ozone/src/site/markdown/s3-shell.md
@@ -0,0 +1,17 @@
+# S3 Shell
+
+## Set Secret
+
+Updates the secret for an S3 user.
+
+### Syntax
+
+```bash
+ozone sh s3 setsecret --secret=<newsecret>
+```
+
+### Examples
+
+```bash
+ozone sh s3 setsecret --secret=my-new-secret
+```
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]