feat(cfold): canonicalize custom test layout
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -11,15 +11,15 @@ and a JSON Content/Admin API at `/ghost/api/*`. Defining behaviors exercised:
|
||||
|
||||
| cc-ci file | what's verified | rationale |
|
||||
|---|---|---|
|
||||
| `tests/ghost/functional/test_content_api.py` | GETs `/ghost/api/content/settings/`; asserts 200 with `{"settings": {...}}` envelope OR 401/403 with a Ghost error envelope. | Distinguishes "the ghost-server JS process is up + emitting its API" from "a static themed page is served at /." A wedged Ghost backend → 5xx; misrouted nginx → 404. |
|
||||
| `tests/ghost/functional/test_admin_redirect.py` | GETs `/ghost/`; asserts 200 or 302 + Ghost branding/SPA references in the response (or a redirect to /ghost/#/setup on fresh deploy). | Proves the admin route is wired through the nginx proxy. Distinguishes "admin SPA bound" from "404 (route missing)" or "5xx (broken)." |
|
||||
| `tests/ghost/custom/test_content_api.py` | GETs `/ghost/api/content/settings/`; asserts 200 with `{"settings": {...}}` envelope OR 401/403 with a Ghost error envelope. | Distinguishes "the ghost-server JS process is up + emitting its API" from "a static themed page is served at /." A wedged Ghost backend → 5xx; misrouted nginx → 404. |
|
||||
| `tests/ghost/custom/test_admin_redirect.py` | GETs `/ghost/`; asserts 200 or 302 + Ghost branding/SPA references in the response (or a redirect to /ghost/#/setup on fresh deploy). | Proves the admin route is wired through the nginx proxy. Distinguishes "admin SPA bound" from "404 (route missing)" or "5xx (broken)." |
|
||||
|
||||
Two specific tests + parity health_check = ≥2 floor met.
|
||||
|
||||
## Plan §4.3 prescribed deeper test — AUTHORED (closes DEFERRED ghost create-post)
|
||||
|
||||
§4.3 named "create-a-post round-trip" for ghost. Implemented in
|
||||
`tests/ghost/functional/test_post_roundtrip.py` (helper `functional/_ghost.py`):
|
||||
`tests/ghost/custom/test_post_roundtrip.py` (helper `custom/_ghost.py`):
|
||||
1. Wait for the Admin API healthcheck (`GET /ghost/api/admin/site/` → 200).
|
||||
2. Setup the Ghost owner (POST `/ghost/api/admin/authentication/setup/`, fresh deploy) + establish
|
||||
an admin **session cookie** (POST `/ghost/api/admin/session/`) — cookie-aware stdlib opener,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Ghost serves an HTML site at `/`; admin UI at `/ghost/`. The first GET to /ghost/ redirects
|
||||
# to the setup wizard (302). Ghost exposes a JSON Content API at /ghost/api/content/ which
|
||||
# requires an API key; the Admin API at /ghost/api/admin/ requires a session/token (see
|
||||
# functional/_ghost.py — version-negotiated, no /v3/ path).
|
||||
# custom/_ghost.py — version-negotiated, no /v3/ path).
|
||||
# State lives in a **MySQL** `ghost` DB (compose `db` service, mysql:8.0) + the `ghost_content`
|
||||
# volume (themes/images) — NOT sqlite. The `db` service is backupbot-labelled with a logical
|
||||
# mysqldump pre-hook; P4 (ops.py + test_{backup,restore,upgrade}.py) seeds a `ci_marker` row there.
|
||||
|
||||
Reference in New Issue
Block a user