mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 10:07:28 +01:00
ci: run the S3 versioning suite on a postgres_flat filer
The whole test/s3/versioning suite, stress tests included, against a weed mini whose filer.toml enables postgres_flat. The job first checks that filemeta has the flat layout, so a filer on its default store cannot pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK
This commit is contained in:
1 parent
09be534d67
commit
2fdfd8cd99
1 file changed
+63
@@ -6,6 +6,7 @@ on:
|
||||
paths:
|
||||
- 'weed/**'
|
||||
- 'test/postgres_flat/**'
|
||||
- 'test/s3/versioning/**'
|
||||
- 'test/testutil/**'
|
||||
- 'test/volume_server/framework/**'
|
||||
- 'go.mod'
|
||||
@@ -16,6 +17,7 @@ on:
|
||||
paths:
|
||||
- 'weed/**'
|
||||
- 'test/postgres_flat/**'
|
||||
- 'test/s3/versioning/**'
|
||||
- 'test/testutil/**'
|
||||
- 'test/volume_server/framework/**'
|
||||
- 'go.mod'
|
||||
@@ -70,3 +72,64 @@ jobs:
|
||||
RUN_POSTGRES_TESTS: "1"
|
||||
WEED_BINARY: ${{ github.workspace }}/weed/weed
|
||||
run: go test -v -count=1 -timeout=20m ./test/postgres_flat/
|
||||
|
||||
versioning-suite:
|
||||
name: S3 versioning suite over postgres_flat
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 30
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17
|
||||
env:
|
||||
POSTGRES_PASSWORD: postgres
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 5s
|
||||
--health-timeout 5s
|
||||
--health-retries 20
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v7
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
cache: ${{ runner.environment == 'github-hosted' }}
|
||||
|
||||
- name: Build SeaweedFS
|
||||
run: go build -o weed/weed -buildvcs=false ./weed
|
||||
|
||||
- name: Start weed mini on postgres_flat
|
||||
run: |
|
||||
mkdir -p "$RUNNER_TEMP/config" "$RUNNER_TEMP/data"
|
||||
: > "$RUNNER_TEMP/config/security.toml"
|
||||
cat > "$RUNNER_TEMP/config/filer.toml" <<'EOF'
|
||||
[postgres_flat]
|
||||
enabled = true
|
||||
hostname = "127.0.0.1"
|
||||
port = 5432
|
||||
username = "postgres"
|
||||
password = "postgres"
|
||||
database = "postgres"
|
||||
sslmode = "disable"
|
||||
EOF
|
||||
weed/weed -config_dir="$RUNNER_TEMP/config" mini -ip=127.0.0.1 -ip.bind=127.0.0.1 \
|
||||
-dir="$RUNNER_TEMP/data" -s3.config="$GITHUB_WORKSPACE/docker/compose/s3.json" \
|
||||
-webdav=false -admin.ui=false > "$RUNNER_TEMP/weed.log" 2>&1 &
|
||||
for i in $(seq 90); do curl -s -o /dev/null http://127.0.0.1:8333 && break; sleep 1; done
|
||||
curl -s -o /dev/null http://127.0.0.1:8333 || { cat "$RUNNER_TEMP/weed.log"; exit 1; }
|
||||
test "$(docker exec ${{ job.services.postgres.id }} psql -U postgres -Atc "SELECT count(*) FROM information_schema.columns WHERE table_name = 'filemeta' AND column_name = 'path'")" = 1
|
||||
|
||||
- name: Run the S3 versioning suite
|
||||
env:
|
||||
ENABLE_STRESS_TESTS: "true"
|
||||
run: go test -v -count=1 -timeout=25m ./test/s3/versioning/
|
||||
|
||||
- name: Show the server log
|
||||
if: failure()
|
||||
run: tail -200 "$RUNNER_TEMP/weed.log"
|
||||
Reference in new issue
Block a user