Commit fde83cbf5f

fde83cbf5fe5a0a520231a428e134cdbebe2b6a9

parent: f8c1e35051

Verified · cmc ci/build: success ci/test: success

cmc <hello@cleberg.net> · 2026-09-23 06:35 UTC

e2e: the cancel test reads live build pages with follow=0

A queued or running build's page now streams until the build ends.

Ref #250
e2e/buildcancelweb_test.go +4 −4
@@ -46,13 +46,13 @@ func TestBuildCancelWeb(t *testing.T) {
4646 build1 := inst.base() + "/alice/app/builds/1"
4747
4848 // Build 1 is queued: the control is on the page, for someone with
49 // write access.
50 _, body := browserGet(t, alice, build1)
49 // write access. follow=0: a live build's page streams until it ends.
50 _, body := browserGet(t, alice, build1+"?follow=0")
5151 if !strings.Contains(body, `action="/alice/app/builds/1/cancel"`) {
5252 t.Fatalf("no cancel control on a queued build:\n%s", body)
5353 }
5454 // A reader gets no control.
55 _, anon := browserGet(t, newBrowser(t), build1)
55 _, anon := browserGet(t, newBrowser(t), build1+"?follow=0")
5656 if strings.Contains(anon, "/cancel") {
5757 t.Fatal("anonymous visitor sees the cancel control")
5858 }
@@ -78,7 +78,7 @@ func TestBuildCancelWeb(t *testing.T) {
7878 t.Fatalf("runner claim: %s", out)
7979 }
8080 build2 := inst.base() + "/alice/app/builds/2"
81 _, body = browserGet(t, alice, build2)
81 _, body = browserGet(t, alice, build2+"?follow=0")
8282 if !strings.Contains(body, "running") {
8383 t.Fatalf("build 2 not running:\n%s", body)
8484 }