Skip to content

Commit

Permalink
Run s3-tests against Azurite in CI
Browse files Browse the repository at this point in the history
Fixes #700.
  • Loading branch information
gaul committed Nov 11, 2024
1 parent d8350b5 commit e175ca7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ jobs:
- name: Run s3-tests
run: |
./src/test/resources/run-s3-tests.sh
- name: Run s3-tests with Azurite
run: |
./src/test/resources/run-s3-tests.sh s3proxy-azurite.conf
#Store the target
- uses: actions/upload-artifact@v4
Expand Down
15 changes: 11 additions & 4 deletions src/test/resources/run-s3-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
set -o errexit
set -o nounset

S3PROXY_CONF="${1-s3proxy.conf}"
S3PROXY_BIN="${PWD}/target/s3proxy"
S3PROXY_PORT="${S3PROXY_PORT:-8081}"
export S3TEST_CONF="${PWD}/src/test/resources/s3-tests.conf"

# launch S3Proxy using HTTP and a fixed port
sed "s,^\(s3proxy.endpoint\)=.*,\1=http://127.0.0.1:${S3PROXY_PORT}," \
< src/test/resources/s3proxy.conf | grep -v secure-endpoint > target/s3proxy.conf
< "src/test/resources/$S3PROXY_CONF" | grep -v secure-endpoint > target/s3proxy.conf
$S3PROXY_BIN --properties target/s3proxy.conf &
S3PROXY_PID=$!

Expand All @@ -30,9 +31,7 @@ do
sleep 1
done

# execute s3-tests
pushd s3-tests
tox -- -m 'not fails_on_s3proxy'\
tags='not fails_on_s3proxy'\
' and not appendobject'\
' and not bucket_policy'\
' and not checksum'\
Expand All @@ -54,3 +53,11 @@ tox -- -m 'not fails_on_s3proxy'\
' and not user_policy'\
' and not versioning'\
' and not webidentity_test'

if [ "${S3PROXY_CONF}" = "s3proxy-azurite.conf" ]; then
tags="${tags} and not multipart"
fi

# execute s3-tests
pushd s3-tests
tox -- -m "${tags}"

0 comments on commit e175ca7

Please sign in to comment.