Commit f116776
ci: fix Caddy route tests and run them on Caddy config changes
The Caddy route tests workflow has failed on every weekly scheduled run
since late 2024, because the test harness fell behind three changes to
the code it tests:
- caddy-reconfigure.mjs templates 404.html alongside index.html
(#37672), but the harness only created a fake index.html, so every
spec died with ENOENT before any route assertions ran.
- caddy-reconfigure.mjs invokes the Caddy binary via _APPSMITH_CADDY,
which only the production entrypoint exports.
- The generated Caddyfile now binds the admin API to a unix socket
(#41847), but the harness started Caddy with no config, leaving the
admin API on the default TCP port where reloads could not reach it.
The harness now bootstraps Caddy with the same admin socket, matching
how the production entrypoint starts it.
Two further breakages came from unpinned tooling in the test image:
- Current Caddy no longer compresses the 512-byte test file; the test
file is now 4096 bytes.
- hurl 8 no longer picks up HURL_* environment variables, so the
frame_ancestors default is passed with an explicit --variable flag,
which spec-specific definitions still override.
The workflow's weekly cron never caught regressions at the moment they
were introduced and let it stay red quietly. It is replaced with push
and pull_request triggers path-filtered to the files the workflow
actually exercises.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 8ac6dc9 commit f116776
2 files changed
Lines changed: 32 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
7 | 23 | | |
8 | 24 | | |
9 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | | - | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | | - | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
| |||
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
63 | | - | |
64 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
69 | | - | |
| 77 | + | |
70 | 78 | | |
71 | 79 | | |
72 | 80 | | |
| |||
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
129 | | - | |
| 137 | + | |
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
| |||
0 commit comments