Skip to content

Commit 25912ce

Browse files
committed
Remove non-strict Mastodon smoke test
The non-strict variant only exercised plain HTTP without signature verification, which no longer reflects how Fedify is used against real fediverse servers. The strict variant (HTTPS + HTTP signature verification via Caddy TLS proxies) is now the sole Mastodon smoke test. Renamed the strict files to canonical names so the layout matches the other service smoke tests: - docker-compose.strict.yml → docker-compose.yml - provision-strict.sh → provision.sh - mastodon-strict.env → mastodon.env - smoke-mastodon-strict.yml → smoke-mastodon.yml Assisted-by: Claude Code:claude-opus-4-6
1 parent 290cbf4 commit 25912ce

File tree

9 files changed

+139
-478
lines changed

9 files changed

+139
-478
lines changed

.github/workflows/smoke-mastodon-strict.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.
Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
22
#
3-
# Interoperability smoke tests.
4-
# Spins up a Mastodon instance via Docker Compose and verifies that Fedify
5-
# can correctly exchange ActivityPub messages with it.
3+
# Interoperability smoke tests (HTTPS + HTTP signature verification).
4+
# Uses a standalone Docker Compose file with Caddy TLS proxies to verify that
5+
# Fedify correctly signs and verifies requests over HTTPS.
66
# See: https://github.com/fedify-dev/fedify/issues/481
77
name: smoke-mastodon
88

99
on:
10-
push:
11-
branches:
12-
- main
13-
- next
14-
- "*.*-maintenance"
10+
schedule:
11+
- cron: "0 6 * * *"
1512
workflow_dispatch:
1613

1714
concurrency:
@@ -23,11 +20,26 @@ jobs:
2320
runs-on: ubuntu-latest
2421
timeout-minutes: 25
2522

23+
env:
24+
COMPOSE: >-
25+
docker compose
26+
-f test/smoke/mastodon/docker-compose.yml
27+
2628
steps:
2729
- uses: actions/checkout@v4
2830

2931
- uses: ./.github/actions/setup-mise
3032

33+
- name: Generate TLS certificates
34+
run: bash test/smoke/mastodon/generate-certs.sh test/smoke/mastodon/.certs
35+
36+
- name: Verify certificates
37+
run: |
38+
openssl verify -CAfile test/smoke/mastodon/.certs/ca.crt \
39+
test/smoke/mastodon/.certs/fedify-harness.crt
40+
openssl verify -CAfile test/smoke/mastodon/.certs/ca.crt \
41+
test/smoke/mastodon/.certs/mastodon.crt
42+
3143
- name: Generate Mastodon secrets
3244
run: |
3345
IMAGE=ghcr.io/mastodon/mastodon:v4.3.9
@@ -47,33 +59,33 @@ jobs:
4759
4860
- name: Start database and redis
4961
run: |
50-
docker compose -f test/smoke/mastodon/docker-compose.yml up -d db redis
51-
docker compose -f test/smoke/mastodon/docker-compose.yml exec -T db \
62+
$COMPOSE up -d db redis
63+
$COMPOSE exec -T db \
5264
sh -c 'until pg_isready -U mastodon; do sleep 1; done'
5365
5466
- name: Run DB setup and migrations
5567
run: |
56-
docker compose -f test/smoke/mastodon/docker-compose.yml run --rm -T \
57-
mastodon-web bundle exec rails db:setup
68+
$COMPOSE run --rm -T \
69+
mastodon-web-backend bundle exec rails db:setup
5870
timeout-minutes: 5
5971

6072
- name: Start Mastodon stack
61-
run: docker compose -f test/smoke/mastodon/docker-compose.yml up --wait
73+
run: $COMPOSE up --wait
6274
timeout-minutes: 12
6375

6476
- name: Provision Mastodon
6577
run: bash test/smoke/mastodon/provision.sh
6678

6779
- name: Verify connectivity
6880
run: |
69-
echo "=== Harness health (from mastodon-web) ==="
70-
docker compose -f test/smoke/mastodon/docker-compose.yml exec -T mastodon-web \
71-
curl -sf http://fedify-harness:3001/_test/health
81+
echo "=== Harness health (from mastodon-web-backend, via Caddy TLS) ==="
82+
$COMPOSE exec -T mastodon-web-backend \
83+
curl -sf https://fedify-harness/_test/health
7284
echo " OK"
7385
74-
echo "=== Harness health (from mastodon-sidekiq) ==="
75-
docker compose -f test/smoke/mastodon/docker-compose.yml exec -T mastodon-sidekiq \
76-
curl -sf http://fedify-harness:3001/_test/health
86+
echo "=== Harness health (from mastodon-sidekiq, via Caddy TLS) ==="
87+
$COMPOSE exec -T mastodon-sidekiq \
88+
curl -sf https://fedify-harness/_test/health
7789
echo " OK"
7890
7991
- name: Run smoke tests
@@ -86,8 +98,8 @@ jobs:
8698
if: failure()
8799
run: |
88100
echo "=== Docker Compose logs ==="
89-
docker compose -f test/smoke/mastodon/docker-compose.yml logs --tail=500
101+
$COMPOSE logs --tail=500
90102
91103
- name: Teardown
92104
if: always()
93-
run: docker compose -f test/smoke/mastodon/docker-compose.yml down -v
105+
run: $COMPOSE down -v

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ repomix-output.xml
1010
test/smoke/.env.test
1111
test/smoke/mastodon/.certs/
1212
test/smoke/mastodon/mastodon.env
13-
test/smoke/mastodon/mastodon-strict.env
1413
test/smoke/sharkey/.certs/
1514
test/smoke/sharkey/sharkey.env
1615
smoke.log

test/smoke/mastodon/docker-compose.strict.yml

Lines changed: 0 additions & 159 deletions
This file was deleted.

0 commit comments

Comments
 (0)