ci: assert key IPTV endpoints in the container smoke test (#16) #31

Merged
timothy merged 1 commits from foundations/16-container-e2e into main 2026-06-27 11:28:42 +02:00
Owner

Refs #16. Upgrades the image smoke test from "the app serves HTTP" to a real E2E against the Jellyfin-facing surfaces on the freshly built container — so a routing / base-URL (#1) / migration regression that leaves the app "up" but serving broken output fails CI instead of surfacing in Jellyfin.

What it asserts (after HTTP readiness)

  • /iptv/channels.m3u → 2xx containing #EXTM3U
  • /iptv/xmltv.xml → 2xx containing a <tv root

xmltv.xml needs channels.xml, which the scheduler writes a few seconds after boot, so each endpoint is polled with a deadline. Container logs are dumped on failure. Reuses the existing unique-name + trap … EXIT cleanup.

Empirically validated before committing (via the real image)

Ran :latest on a fresh container and confirmed both endpoints return 200 with the expected shape (#EXTM3U… / …<?xml…?><tv generator-info-name="ersatztv"…), then ran the exact check() commands from the workflow against it — both pass. Used single-line python3 -c (no heredoc) to avoid YAML-indentation pitfalls; YAML parses.

Note

The smoke step is main/tag-only (the image build job is skipped on PRs), so this PR's checks are test + migrations; the new E2E runs on the merge to main (verified there). Pairs with the M3U golden tests (#11).

Refs #16. Upgrades the image smoke test from "the app **serves HTTP**" to a real **E2E** against the Jellyfin-facing surfaces on the freshly built container — so a routing / base-URL (#1) / migration regression that leaves the app "up" but serving broken output fails CI instead of surfacing in Jellyfin. ## What it asserts (after HTTP readiness) - `/iptv/channels.m3u` → 2xx containing `#EXTM3U` - `/iptv/xmltv.xml` → 2xx containing a `<tv` root `xmltv.xml` needs `channels.xml`, which the scheduler writes a few seconds after boot, so each endpoint is **polled with a deadline**. Container logs are dumped on failure. Reuses the existing unique-name + `trap … EXIT` cleanup. ## Empirically validated before committing (via the real image) Ran `:latest` on a fresh container and confirmed both endpoints return **200** with the expected shape (`#EXTM3U…` / `…<?xml…?><tv generator-info-name="ersatztv"…`), then ran the **exact `check()` commands** from the workflow against it — both pass. Used single-line `python3 -c` (no heredoc) to avoid YAML-indentation pitfalls; YAML parses. ## Note The smoke step is `main`/tag-only (the image `build` job is skipped on PRs), so this PR's checks are `test` + `migrations`; **the new E2E runs on the merge to `main`** (verified there). Pairs with the M3U golden tests (#11).
timothy added 1 commit 2026-06-27 11:23:05 +02:00
ci: assert key IPTV endpoints in the container smoke test (#16)
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 4m4s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 5m5s
Build ErsatzTV Image / Build & test (.NET) (push) Successful in 4m36s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (push) Successful in 5m46s
Build ErsatzTV Image / Build & push image (amd64) (push) Successful in 3m47s
2edf3dab49
Extend the image smoke test from "serves HTTP" to a real E2E: after HTTP readiness,
assert the Jellyfin-facing surfaces on the freshly built image — /iptv/channels.m3u
returns 2xx containing #EXTM3U, and /iptv/xmltv.xml returns 2xx containing a <tv root.
xmltv.xml needs channels.xml (the scheduler writes it a few seconds after boot), so each
endpoint is polled with a deadline; container logs are dumped on failure. Catches
routing / base-URL (#1) / migration regressions that leave the app "up" but serving
broken playlists/guides.

Validated the exact checks against the real :latest image on a fresh container (both 200
with the expected shape) before committing.

Refs #16

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
timothy merged commit 2edf3dab49 into main 2026-06-27 11:28:42 +02:00
timothy deleted branch foundations/16-container-e2e 2026-06-27 11:28:43 +02:00
Sign in to join this conversation.