Commit fde83cbf5f
Verified · cmc ci/build: success ci/test: success
e2e/buildcancelweb_test.go +4 −4
| @@ -46,13 +46,13 @@ func TestBuildCancelWeb(t *testing.T) { | ||
| 46 | 46 | build1 := inst.base() + "/alice/app/builds/1" |
| 47 | 47 | |
| 48 | 48 | // 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") | |
| 51 | 51 | if !strings.Contains(body, `action="/alice/app/builds/1/cancel"`) { |
| 52 | 52 | t.Fatalf("no cancel control on a queued build:\n%s", body) |
| 53 | 53 | } |
| 54 | 54 | // A reader gets no control. |
| 55 | _, anon := browserGet(t, newBrowser(t), build1) | |
| 55 | _, anon := browserGet(t, newBrowser(t), build1+"?follow=0") | |
| 56 | 56 | if strings.Contains(anon, "/cancel") { |
| 57 | 57 | t.Fatal("anonymous visitor sees the cancel control") |
| 58 | 58 | } |
| @@ -78,7 +78,7 @@ func TestBuildCancelWeb(t *testing.T) { | ||
| 78 | 78 | t.Fatalf("runner claim: %s", out) |
| 79 | 79 | } |
| 80 | 80 | build2 := inst.base() + "/alice/app/builds/2" |
| 81 | _, body = browserGet(t, alice, build2) | |
| 81 | _, body = browserGet(t, alice, build2+"?follow=0") | |
| 82 | 82 | if !strings.Contains(body, "running") { |
| 83 | 83 | t.Fatalf("build 2 not running:\n%s", body) |
| 84 | 84 | } |