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

Layout: unified · split

e2e/buildcancelweb_test.go +4 −4
@@ -46,13 +46,13 @@ func TestBuildCancelWeb(t *testing.T) {
46 build1 := inst.base() + "/alice/app/builds/1" 46 build1 := inst.base() + "/alice/app/builds/1"
47 47
48 // Build 1 is queued: the control is on the page, for someone with 48 // Build 1 is queued: the control is on the page, for someone with
49 // write access. 49 // write access. follow=0: a live build's page streams until it ends.
50 _, body := browserGet(t, alice, build1) 50 _, body := browserGet(t, alice, build1+"?follow=0")
51 if !strings.Contains(body, `action="/alice/app/builds/1/cancel"`) { 51 if !strings.Contains(body, `action="/alice/app/builds/1/cancel"`) {
52 t.Fatalf("no cancel control on a queued build:\n%s", body) 52 t.Fatalf("no cancel control on a queued build:\n%s", body)
53 } 53 }
54 // A reader gets no control. 54 // A reader gets no control.
55 _, anon := browserGet(t, newBrowser(t), build1) 55 _, anon := browserGet(t, newBrowser(t), build1+"?follow=0")
56 if strings.Contains(anon, "/cancel") { 56 if strings.Contains(anon, "/cancel") {
57 t.Fatal("anonymous visitor sees the cancel control") 57 t.Fatal("anonymous visitor sees the cancel control")
58 } 58 }
@@ -78,7 +78,7 @@ func TestBuildCancelWeb(t *testing.T) {
78 t.Fatalf("runner claim: %s", out) 78 t.Fatalf("runner claim: %s", out)
79 } 79 }
80 build2 := inst.base() + "/alice/app/builds/2" 80 build2 := inst.base() + "/alice/app/builds/2"
81 _, body = browserGet(t, alice, build2) 81 _, body = browserGet(t, alice, build2+"?follow=0")
82 if !strings.Contains(body, "running") { 82 if !strings.Contains(body, "running") {
83 t.Fatalf("build 2 not running:\n%s", body) 83 t.Fatalf("build 2 not running:\n%s", body)
84 } 84 }