diff --git a/.github/services/s3/0_minio_s3/action.yml b/.github/services/s3/0_minio_s3/action.yml index 8d2e873b759..2ee8bc8bb31 100644 --- a/.github/services/s3/0_minio_s3/action.yml +++ b/.github/services/s3/0_minio_s3/action.yml @@ -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 @@ -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 diff --git a/.github/services/s3/ceph_radios_s3_with_versioning/action.yml b/.github/services/s3/ceph_radios_s3_with_versioning/action.yml new file mode 100644 index 00000000000..8c38e501083 --- /dev/null +++ b/.github/services/s3/ceph_radios_s3_with_versioning/action.yml @@ -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 diff --git a/.github/services/s3/ceph_rados_s3/action.yml b/.github/services/s3/ceph_rados_s3/action.yml index a2377755c07..dfb4b5ad6a6 100644 --- a/.github/services/s3/ceph_rados_s3/action.yml +++ b/.github/services/s3/ceph_rados_s3/action.yml @@ -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 @@ -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 diff --git a/.github/services/s3/minio_s3_with_versioning/action.yml b/.github/services/s3/minio_s3_with_versioning/action.yml new file mode 100644 index 00000000000..e5bf5618b9d --- /dev/null +++ b/.github/services/s3/minio_s3_with_versioning/action.yml @@ -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