diff --git a/internal/catalogue/port_into_test.go b/internal/catalogue/port_into_test.go index 8f3c2f4..1e13cb5 100644 --- a/internal/catalogue/port_into_test.go +++ b/internal/catalogue/port_into_test.go @@ -162,7 +162,9 @@ func TestAContainerWithNoPortPlaceholderKeepsItsEnvironment(t *testing.T) { if got := sidecar["env"].(map[string]any)["MESH_GITEA_URL"]; got != "http://gitea:3000" { t.Fatalf("an address on the runtime's own network was moved to the machine's port: %v", got) } - if !reflect.DeepEqual(sidecar["env"], env) { + // The same map, not a copy of it: a container that asks for nothing is left alone, and + // comparing the contents would say yes even to a rebuilt map. + if reflect.ValueOf(sidecar["env"]).Pointer() != reflect.ValueOf(env).Pointer() { t.Fatalf("a container that asked for nothing had its environment rebuilt: %v", sidecar["env"]) } }