diff --git a/cmd/mesh-controller/sendable_integration_test.go b/cmd/mesh-controller/sendable_integration_test.go index ac441a8b..da974574 100644 --- a/cmd/mesh-controller/sendable_integration_test.go +++ b/cmd/mesh-controller/sendable_integration_test.go @@ -34,8 +34,8 @@ func TestAConvergedDeclarationIsByteForByteWhatItWas(t *testing.T) { t.Fatal(err) } if string(body) != convergedBefore { - t.Fatalf("a converged declaration changed; an older host parses this strictly:\n%s\n%s", - body, convergedBefore) + // One line, got first: the verdict keeps only a failure's first line (issue 1921), and the bytes are what to capture. + t.Fatalf("a converged declaration changed; an older host parses this strictly: got %s want %s", body, convergedBefore) } if bytes.Contains(body, []byte(`"adoption"`)) { t.Fatal("a converged declaration names adoption; an older host would refuse it") diff --git a/cmd/mesh-controller/sendable_test.go b/cmd/mesh-controller/sendable_test.go index 0616525f..5c32546e 100644 --- a/cmd/mesh-controller/sendable_test.go +++ b/cmd/mesh-controller/sendable_test.go @@ -47,7 +47,11 @@ func composed(t *testing.T, open *stores, node string) sendable { // machine's own resolver knows the mesh's names now — and left this string carrying it, so the // guard failed for a day and nothing ran it. A field an older host never sees is the one change // this guard permits; a field it would refuse is the one it exists to catch. -const convergedBefore = `{"declaration":1,"resources":[{"content":"hello","id":"hello-web.page","path":"/var/lib/hello-web/index.html","type":"file"},{"id":"hello-web.server","image":"registry.example/hello@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","name":"hello-web","type":"container"},{"id":"hello-web.served","path":"/var/lib/hello-web","type":"directory"}]}` +// +// Re-captured for release 6 (issue 1945): every composition is for a node-engine of release 6, which reads a module per +// resource (readNode sets ReadsModules), so each resource carries its "module". An older host that never said it reads them is +// no longer sent a declaration; the field is the wire's own since issue 1145. +const convergedBefore = `{"declaration":1,"resources":[{"content":"hello","id":"hello-web.page","module":"hello-web","path":"/var/lib/hello-web/index.html","type":"file"},{"id":"hello-web.server","image":"registry.example/hello@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","module":"hello-web","name":"hello-web","type":"container"},{"id":"hello-web.served","module":"hello-web","path":"/var/lib/hello-web","type":"directory"}]}` func mustNodes(t *testing.T, open *stores) []inventory.Node { t.Helper()