package main // What main wires for the moved path (novox/hq issue 1332): the harness it builds from the environment, the same // way the grant path reads its own settings. import "testing" // 1332/AC3: the moved-path harness, built from the environment, reads MESH_RECEIVES the way the grant path does // (main.go's other branch, line 67), as postgres's moved harness does (postgres-provider/main.go:43). func TestTheMovedPathHarnessReadsMESH_RECEIVESAsTheGrantPathDoes(t *testing.T) { env := map[string]string{"MESH_RECEIVES": "/grants/mesh.json", "MESH_NODE": "novox"} getenv := func(k string) string { return env[k] } h := movedHarness(getenv, provisioner{}) if h.Receives != env["MESH_RECEIVES"] { t.Fatalf("Receives = %q, want %q — the grant file still gives every consumer not moved (issue 937), "+ "read exactly as MESH_RECEIVES on the grant path, as postgres's moved harness does "+ "(postgres-provider/main.go:43)", h.Receives, env["MESH_RECEIVES"]) } }