Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
strategy:
fail-fast: false
matrix:
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
part: [1, 2, 3, 4] # FIXME: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
Expand All @@ -107,15 +107,35 @@ jobs:
name: acceptance-ocis-part-${{ matrix.part }}
path: tmp/testrunner/tests/acceptance/output/

# TODO: acceptance-tests-s3ng skipped — blocked on Ceph networking — follow-up PR
acceptance-tests-s3ng:
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4, 5, 6]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: "8.4"
- run: python3 tests/acceptance/run-acceptance.py --storage s3ng --total-parts 6 --run-part ${{ matrix.part }}
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: failure()
with:
name: acceptance-s3ng-part-${{ matrix.part }}
path: tmp/testrunner/tests/acceptance/output/

acceptance-tests-posixfs:
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
part: [1, 2, 3, 4] # FIXME: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
Expand All @@ -142,6 +162,7 @@ jobs:
- litmus
- cs3api-validator
- acceptance-tests-ocis
- acceptance-tests-s3ng
- acceptance-tests-posixfs
runs-on: ubuntu-latest
steps:
Expand All @@ -154,6 +175,7 @@ jobs:
"${{ needs.litmus.result }}"
"${{ needs.cs3api-validator.result }}"
"${{ needs.acceptance-tests-ocis.result }}"
"${{ needs.acceptance-tests-s3ng.result }}"
"${{ needs.acceptance-tests-posixfs.result }}"
)
for r in "${results[@]}"; do
Expand Down
25 changes: 22 additions & 3 deletions tests/acceptance/run-acceptance.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ def start_redis():
wait_for_port(REDIS_PORT, timeout=30, label="Redis")


def ceph_rgw_ready():
"""Check RGW is actually responding (not just Docker proxy listening)."""
r = subprocess.run(
["curl", "-sf", "--max-time", "2", f"http://localhost:{CEPH_PORT}"],
capture_output=True,
)
# RGW returns XML even for anonymous requests — any HTTP response means it's up
return r.returncode == 0


def start_ceph():
print("Starting Ceph...")
subprocess.run(
Expand All @@ -203,9 +213,18 @@ def start_ceph():
CEPH_IMAGE],
check=True,
)
wait_for_port(CEPH_PORT, timeout=180, label="Ceph RGW")
# Wait for demo bucket creation after RGW starts accepting connections
time.sleep(15)
# Docker port mapping makes TCP port appear open before RGW binds inside container.
# Must use HTTP check to verify RGW is actually responding.
start = time.time()
while time.time() - start < 180:
if ceph_rgw_ready():
print("Ceph RGW ready.", flush=True)
# Extra wait for demo bucket creation after RGW starts
time.sleep(10)
return
time.sleep(2)
subprocess.run(["docker", "logs", "--tail", "50", "ceph"])
sys.exit("Timeout waiting for Ceph RGW after 180s")


SERVICE_STARTERS = {
Expand Down
20 changes: 17 additions & 3 deletions tests/acceptance/run-cs3api.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@ def prepare_configs(storage):
return config_dir


def ceph_rgw_ready():
r = subprocess.run(
["curl", "-sf", "--max-time", "2", f"http://localhost:{CEPH_PORT}"],
capture_output=True,
)
return r.returncode == 0


def start_ceph():
print("Starting Ceph...")
env_args = []
Expand All @@ -126,9 +134,15 @@ def start_ceph():
env_args + [CEPH_IMAGE],
check=True,
)
wait_for_port(CEPH_PORT, timeout=180, label="Ceph RGW")
# Wait for demo bucket creation after RGW starts accepting connections
time.sleep(15)
start = time.time()
while time.time() - start < 180:
if ceph_rgw_ready():
print("Ceph RGW ready.", flush=True)
time.sleep(10)
return
time.sleep(2)
subprocess.run(["docker", "logs", "--tail", "50", "ceph"])
sys.exit("Timeout waiting for Ceph RGW after 180s")


def start_revad_services(config_dir, storage):
Expand Down
Loading