# Per-recipe harness config for mattermost-lts (Phase 2 Q4.5 — team chat / collaboration platform). # # Stack (compose.yml): app (mattermost/mattermost-team-edition) + postgres (postgres:15-alpine, # bundled IN-STACK — NOT an external dep). HTTP-native: the app serves the web UI + REST API # (/api/v4/...) at `/` through Traefik. No reference corpus under recipe-info/ → P2 (parity) is # vacuously satisfied; coverage is ≥2 recipe-specific functional tests (P3) on the proven HTTP harness. # # Health: mattermost serves its web app at `/`. A fresh server with no users redirects `/` toward the # setup/login flow (302) or serves the SPA shell (200); accept both. The dedicated liveness endpoint # is GET /api/v4/system/ping -> {"status":"OK"} (exercised as a functional test, not the install gate). HEALTH_PATH = "/" HEALTH_OK = (200, 302) # mattermost first-boot runs DB migrations against a fresh postgres volume; the default abra # convergence TIMEOUT (300s) is tight on cc-ci's single node (postgres init + app migrate + plugin # unpack). Bump, kept under DEPLOY_TIMEOUT so abra finishes its convergence wait before the Python # subprocess timeout. DEPLOY_TIMEOUT = 900 HTTP_TIMEOUT = 600 EXTRA_ENV = {"TIMEOUT": "600"} def SCREENSHOT(page, ctx): """Land the real sign-in form for the CI card (phase-shot). The default landing capture gets mattermost's "view in desktop app or browser?" interstitial at `/` — a real page but not representative of the app. `/login` renders the standard login form directly. Credential-free (empty fields, R7 secret-safety: never a page showing generated secrets); the harness snaps the PNG after this returns.""" from harness import browser as harness_browser from harness import screenshot as screenshot_mod harness_browser.goto_with_retry( page, f"{ctx.base_url}/login", accept_statuses=(200,), deadline_seconds=screenshot_mod.NAV_DEADLINE_S, wait_until="domcontentloaded", ) screenshot_mod.settle(page)