Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de658cf40a | ||
|
|
92ac9a4a4a | ||
|
|
4bc92c44eb | ||
|
|
8aa21356af |
@@ -36,3 +36,19 @@ Two kinds of tests live here — run them on **different** cadences:
|
||||
|
||||
A red test is information. Never skip, delete, or relax a test to make a run green — fix the root
|
||||
cause or record it in `machine-docs/DEFERRED.md`. (This is a standing build guardrail.)
|
||||
|
||||
## Ship work as PRs, merge them yourself, operator reviews retrospectively
|
||||
|
||||
Work on this repo goes: **branch → PR → merge it yourself once verified → operator reviews
|
||||
retrospectively.** Do not commit straight to `main`, and do not wait for review before merging — the
|
||||
invocation is the authorization, and blocking would stall the CI this repo runs.
|
||||
|
||||
The PR is therefore not a gate; it is how the work stays legible after the fact. Write the
|
||||
description to be read later: what changed, why, and the evidence it works (harness output, a
|
||||
verified run, a before/after number). A PR that says "fix test" has failed at its only job.
|
||||
|
||||
The same policy covers `recipe-maintainers/cc-ci-orchestrator`. It does **NOT** cover recipe repos —
|
||||
any `coop-cloud/<recipe>` or its mirror is created and verified but **never agent-merged**, because
|
||||
those change what deploys on other people's infrastructure.
|
||||
|
||||
Before editing a test, read `tests/STYLE.md`.
|
||||
|
||||
@@ -110,7 +110,9 @@ def _register_site(domain: str, site: str) -> None:
|
||||
.replace("__SITE__", site)
|
||||
)
|
||||
out = lifecycle.exec_in_app(domain, ["/app/bin/plausible", "rpc", exs], service="app")
|
||||
assert f"CCCI_SITE_OK {site}" in out, f"could not provision site {site!r} via the app: {out.strip()[-400:]}"
|
||||
assert f"CCCI_SITE_OK {site}" in out, (
|
||||
f"could not provision site {site!r} via the app: {out.strip()[-400:]}"
|
||||
)
|
||||
|
||||
|
||||
def _post_event(base_domain: str, site: str, name: str, pathname: str) -> int:
|
||||
@@ -142,9 +144,9 @@ def _ingest_and_count(
|
||||
last_status = None
|
||||
while True:
|
||||
last_status = _post_event(base_domain, site, name, pathname)
|
||||
assert (
|
||||
last_status == 202
|
||||
), f"POST /api/event for {name!r} → HTTP {last_status} (expected 202)"
|
||||
assert last_status == 202, (
|
||||
f"POST /api/event for {name!r} → HTTP {last_status} (expected 202)"
|
||||
)
|
||||
time.sleep(interval)
|
||||
raw = _ch(base_domain, count_sql)
|
||||
count = int(raw) if raw.isdigit() else 0
|
||||
@@ -192,6 +194,6 @@ def test_custom_event_roundtrip(live_app):
|
||||
live_app,
|
||||
f"SELECT name FROM events_v2 WHERE pathname = '{pathname}' LIMIT 1",
|
||||
)
|
||||
assert (
|
||||
stored_name == event_name
|
||||
), f"custom event stored as {stored_name!r}, expected {event_name!r}"
|
||||
assert stored_name == event_name, (
|
||||
f"custom event stored as {stored_name!r}, expected {event_name!r}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user