test(10-05): cover every Phase 10 Go change with branch-level tests

- bouncer TestPhase10CookieGuard: cookie read without Bearer, Bearer wins,
  empty cookie, frontend audience and blacklisted jti rejected
- boardwalk TestPhase10BoardwalkServing: HEAD, query strings, encoded
  traversal, index by name, nested prefix, MIME fallback, constructor errors
- cabana TestPhase10Coverage: mounted unsafe routes vs the CSRF walk, option
  and filter edges, read-only labels, relation message defaults, bundle
  fallback locale, cookie refresh of an expired token in the refresh window
- phrasebook override precedence, new locale, Bundle merge order, Forms shapes
- surf prefix collision for deeper paths and the default /backend prefix
- swagger2openapi TestUnionRewrite and converter branch tests
- framework tests no longer name the application (acme fixtures instead)
This commit is contained in:
Jakub Zych
2026-09-27 18:05:28 +02:00
parent 1c2a66df45
commit ef448da1cc
14 changed files with 1055 additions and 35 deletions

View File

@@ -113,7 +113,7 @@ func TestPluralSmoke(t *testing.T) {
"helloName: \"hi :name :Name :NAME\"\n" +
"raw:\n other: \"{{.Count}} bottles\"\n")},
"lang/pl/lang.yaml": {Data: []byte("" +
"albums:\n one: \":count album\"\n few: \":count albumy\"\n many: \":count albumów\"\n other: \":count albumu\"\n" +
"albums:\n one: \":count plik\"\n few: \":count pliki\"\n many: \":count plików\"\n other: \":count pliku\"\n" +
"posts: \":count wpis|:count wpisy|:count wpisów|:count wpisu\"\n")},
}
cat := NewCatalog()
@@ -122,7 +122,7 @@ func TestPluralSmoke(t *testing.T) {
}
tr := NewTranslator(cat, Options{})
pl := map[any]string{1: "1 album", 2: "2 albumy", 5: "5 albumów", 22: "22 albumy", 0: "0 albumów", 1.5: "1.5 albumu"}
pl := map[any]string{1: "1 plik", 2: "2 pliki", 5: "5 plików", 22: "22 pliki", 0: "0 plików", 1.5: "1.5 pliku"}
for n, want := range pl {
if got := tr.ChoiceIn("pl", "golem15.hello::lang.albums", n, nil); got != want {
t.Fatalf("pl albums %v = %q, want %q", n, got, want)