Skip to content

Commit

Permalink
add versioning test action for minio and ceph_radios
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorgan committed Sep 11, 2024
1 parent 28f83f7 commit 19d0d4e
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/services/s3/0_minio_s3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ runs:
AWS_EC2_METADATA_DISABLED: "true"
run: |
aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test
aws --endpoint-url http://127.0.0.1:9000/ s3api put-bucket-versioning --bucket test --versioning-configuration Status=Enabled
- name: Setup
shell: bash
Expand All @@ -44,5 +43,4 @@ runs:
OPENDAL_S3_ACCESS_KEY_ID=minioadmin
OPENDAL_S3_SECRET_ACCESS_KEY=minioadmin
OPENDAL_S3_REGION=us-east-1
OPENDAL_S3_ENABLE_VERSIONING=true
EOF
47 changes: 47 additions & 0 deletions .github/services/s3/ceph_radios_s3_with_versioning/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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.

name: ceph_rados_s3
description: 'Behavior test for CEPH OBJECT GATEWAY S3'

runs:
using: "composite"
steps:
- name: Setup Ceph Rados Server
shell: bash
working-directory: fixtures/s3
run: docker compose -f docker-compose-ceph-rados.yml up -d --wait

# ceph/demo has support for CEPH_DEMO_BUCKET, but it doesn't work as expected.
- name: Create bucket
shell: bash
working-directory: fixtures/s3
run: |
docker exec ceph-demo s3cmd mb s3://demo
docker exec ceph-demo s3cmd setversioning s3://demo enable
- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
OPENDAL_S3_BUCKET=demo
OPENDAL_S3_ENDPOINT=http://127.0.0.1:8080
OPENDAL_S3_ACCESS_KEY_ID=demo
OPENDAL_S3_SECRET_ACCESS_KEY=demo
OPENDAL_S3_REGION=us-east-1
OPENDAL_S3_ENABLE_VERSIONING=true
EOF
5 changes: 1 addition & 4 deletions .github/services/s3/ceph_rados_s3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ runs:
- name: Create bucket
shell: bash
working-directory: fixtures/s3
run: |
s3cmd mb s3://demo
s3cmd setversioning s3://demo enable
run: docker exec ceph-demo s3cmd mb s3://demo

- name: Setup
shell: bash
Expand All @@ -43,5 +41,4 @@ runs:
OPENDAL_S3_ACCESS_KEY_ID=demo
OPENDAL_S3_SECRET_ACCESS_KEY=demo
OPENDAL_S3_REGION=us-east-1
OPENDAL_S3_ENABLE_VERSIONING=true
EOF
48 changes: 48 additions & 0 deletions .github/services/s3/minio_s3_with_versioning/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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.

name: minio_s3
description: 'Behavior test for Minio S3 with bucket versioning enabled'

runs:
using: "composite"
steps:
- name: Setup MinIO Server
shell: bash
working-directory: fixtures/s3
run: docker compose -f docker-compose-minio.yml up -d --wait
- name: Setup test bucket
shell: bash
env:
AWS_ACCESS_KEY_ID: "minioadmin"
AWS_SECRET_ACCESS_KEY: "minioadmin"
AWS_EC2_METADATA_DISABLED: "true"
run: |
aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test
aws --endpoint-url http://127.0.0.1:9000/ s3api put-bucket-versioning --bucket test --versioning-configuration Status=Enabled
- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
OPENDAL_S3_BUCKET=test
OPENDAL_S3_ENDPOINT=http://127.0.0.1:9000
OPENDAL_S3_ACCESS_KEY_ID=minioadmin
OPENDAL_S3_SECRET_ACCESS_KEY=minioadmin
OPENDAL_S3_REGION=us-east-1
OPENDAL_S3_ENABLE_VERSIONING=true
EOF

0 comments on commit 19d0d4e

Please sign in to comment.