A container's environment follows a moved port, as a file already does (hq issue 088) #46

Merged
jschoubben merged 2 commits from feat/forge-address into main 2026-09-22 21:30:06 +00:00
Showing only changes of commit f0049190d7 - Show all commits
+3 -1
View File
@@ -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"])
}
}