Skip to content

Commit

Permalink
HDDS-5045. Create acceptance test for using rclone with s3 protocol (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ptlrs authored Jan 8, 2025
1 parent f8394cf commit 14bba1e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hadoop-ozone/dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<downloadSources>true</downloadSources>
<docker.ozone.image>apache/ozone</docker.ozone.image>
<docker.ozone.image.flavor>-rocky</docker.ozone.image.flavor> <!-- suffix appended to Ozone version to get Docker image version -->
<docker.ozone-runner.version>20241212-1-jdk21</docker.ozone-runner.version>
<docker.ozone-runner.version>20241216-1-jdk21</docker.ozone-runner.version>
<docker.ozone-testkr5b.image>ghcr.io/apache/ozone-testkrb5:20241129-1</docker.ozone-testkr5b.image>
<maven.test.skip>true</maven.test.skip> <!-- no tests in this module so far -->
<sort.skip>true</sort.skip>
Expand Down
46 changes: 46 additions & 0 deletions hadoop-ozone/dist/src/main/smoketest/s3/rclone.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 rclone client
Library OperatingSystem
Library BuiltIn
Resource ./commonawslib.robot
Test Timeout 15 minutes
Suite Setup Setup s3 tests

*** Variables ***
${ENDPOINT_URL} http://s3g:9878
${S3_VOLUME} s3v
${BUCKET} generated
${RCLONE_CONFIG_NAME} ozone
${RCLONE_CONFIG_PATH} /tmp/rclone.conf
${RCLONE_VERBOSE_LEVEL} 2

*** Keywords ***
# Export access key and secret to the environment
Setup aws credentials
${accessKey} = Execute aws configure get aws_access_key_id
${secret} = Execute aws configure get aws_secret_access_key
Set Environment Variable AWS_SECRET_ACCESS_KEY ${secret}
Set Environment Variable AWS_ACCESS_KEY_ID ${accessKey}

*** Test Cases ***
Rclone Client Test
[Setup] Setup aws credentials
Set Environment Variable RCLONE_CONFIG ${RCLONE_CONFIG_PATH}
Set Environment Variable RCLONE_VERBOSE ${RCLONE_VERBOSE_LEVEL}
${result} = Execute rclone config create ${RCLONE_CONFIG_NAME} s3 env_auth=true provider=Other endpoint=${ENDPOINT_URL}
${result} = Execute rclone copy /opt/hadoop/smoketest ${RCLONE_CONFIG_NAME}:/${S3_VOLUME}/${BUCKET}

0 comments on commit 14bba1e

Please sign in to comment.