Artifact b40a95ea3bd8514c26d0777fcd4afe41d724d42195052e0917d58d5ba7712d0f:
- File
internal/web/opsdoor_test.go
— part of check-in
[3314daeff6]
at
2026-08-25 21:46:49
on branch ops-drill
— ops: a door from /fleet, and a test that it stays
/fleet/ops linked OUT to /fleet seven times and nothing anywhere linked IN. The page was live, gated, and reachable only by typing the URL.
Second surface to ship that way after the notes feed, so it gets a test rather than a promise to remember — both directions, so an admin is never stranded on either.
The link goes in the summary strip that already carries the fleet's counts and the error badge, which is where somebody reading health already is. /fleet answers 'are my repositories healthy'; /fleet/ops answers 'is the forge healthy'. (user: dmestas, size: 1153) [annotate] [blame] [check-ins using] [more...]
package web import ( "strings" "testing" ) // A page with no inbound link is a page that does not exist. // /fleet/ops shipped reachable only by typing the URL — the second // surface to do so, after the notes feed — so the door gets a test // rather than a promise to remember. // // Checked against the template source rather than a rendered page: // /fleet needs an admin session and a live fleet to render, and the // question here is simply whether the link is written at all. func TestFleetLinksToOperations(t *testing.T) { // fleetAdminSource, not fleetSource: the summary strip that carries // the fleet's counts and the error badge lives in the admin half, // which is where an operator reading health already is. if !strings.Contains(fleetAdminSource, `href="/fleet/ops"`) { t.Error("/fleet carries no link to /fleet/ops; the operations page " + "is unreachable without typing the URL") } } // ...and the way back, so an admin is never stranded on either. func TestOperationsLinksBackToFleet(t *testing.T) { if !strings.Contains(opsPageSource, `href="/fleet"`) { t.Error("/fleet/ops carries no link back to /fleet") } }