package build import ( "strings" "testing" ) // Design 47 G ยง568: a key's error opens `transport fault:` only when every lane failed on one. func TestKeyErrorOpensTransportFaultOnlyWhenAllLanesDid(t *testing.T) { tf := "transport fault: deadline, node-build-go ace, i/o timeout" if got := keyError([]string{tf, "mesh-build-node on g14: the step failed: tsc: 2 errors"}); strings.HasPrefix(got, "transport fault:") { t.Errorf("beside a real failure the key opens %q", got) } if got := keyError([]string{tf, tf}); !strings.HasPrefix(got, "transport fault:") { t.Errorf("two transport faults open %q", got) } }