Commit 171bcbd6c9

171bcbd6c9eb98db96d0efdc3c4c8f3ebdd96d81

parent: b862e4a67c

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

cmc <hello@cleberg.net> · 2026-09-24 14:45 UTC

e2e: repo show assertions follow the field layout

Ref #254

Layout: unified · split

e2e/import_test.go +2 −1
@@ -4,6 +4,7 @@ import (
4 "fmt" 4 "fmt"
5 "os" 5 "os"
6 "path/filepath" 6 "path/filepath"
7 "regexp"
7 "strings" 8 "strings"
8 "testing" 9 "testing"
9) 10)
@@ -63,7 +64,7 @@ func TestRepoImport(t *testing.T) {
63 t.Fatalf("imported HEAD = %s", head) 64 t.Fatalf("imported HEAD = %s", head)
64 } 65 }
65 showOut, _, _ := inst.ssh(t, aliceKey, "", "repo", "show", "alice/mirror") 66 showOut, _, _ := inst.ssh(t, aliceKey, "", "repo", "show", "alice/mirror")
66 if !strings.Contains(showOut, "private") || !strings.Contains(showOut, "default: trunk") { 67 if !strings.Contains(showOut, "private") || !regexp.MustCompile(`default branch\s+trunk`).MatchString(showOut) {
67 t.Fatalf("repo show after import: %s", showOut) 68 t.Fatalf("repo show after import: %s", showOut)
68 } 69 }
69 70
e2e/pages_test.go +2 −1
@@ -8,6 +8,7 @@ import (
8 "net/http" 8 "net/http"
9 "os" 9 "os"
10 "path/filepath" 10 "path/filepath"
11 "regexp"
11 "strings" 12 "strings"
12 "sync/atomic" 13 "sync/atomic"
13 "testing" 14 "testing"
@@ -244,7 +245,7 @@ func TestPages(t *testing.T) {
244 } 245 }
245 // repo show lists it; removal stops serving. 246 // repo show lists it; removal stops serving.
246 out, _, _ = inst.ssh(t, aliceKey, "", "repo", "show", "alice/site") 247 out, _, _ = inst.ssh(t, aliceKey, "", "repo", "show", "alice/site")
247 if !strings.Contains(out, "pages domains: docs.example.org") { 248 if !regexp.MustCompile(`pages domains\s+docs\.example\.org`).MatchString(out) {
248 t.Fatalf("repo show missing domains:\n%s", out) 249 t.Fatalf("repo show missing domains:\n%s", out)
249 } 250 }
250 if _, _, code := inst.ssh(t, aliceKey, "", "repo", "domain", "remove", "alice/site", "docs.example.org"); code != 0 { 251 if _, _, code := inst.ssh(t, aliceKey, "", "repo", "domain", "remove", "alice/site", "docs.example.org"); code != 0 {