diff --git a/cmd/mesh-controller/addresses_test.go b/cmd/mesh-controller/addresses_test.go index fbe76d2..39ec4ec 100644 --- a/cmd/mesh-controller/addresses_test.go +++ b/cmd/mesh-controller/addresses_test.go @@ -17,8 +17,8 @@ import ( var aDigest = "sha256:" + strings.Repeat("e", 64) -// **A build is recorded by digest and path**, whatever address the builder pushed to — and only -// what the build made is rewritten: an image the module runs from elsewhere is left where it says. +// **A build is recorded by digest and path**, whatever address the builder pushed to — what it +// made and what it stood on both; an image the module runs from elsewhere is left where it says. func TestABuildIsRecordedWithoutTheStoresAddress(t *testing.T) { manifest, _ := json.Marshal(map[string]any{ "module": "gitea", "version": "1", @@ -65,8 +65,11 @@ func TestABuildIsRecordedWithoutTheStoresAddress(t *testing.T) { if strings.Contains(string(kept.Manifest), "anchor.internal:5100") { t.Errorf("the recorded manifest still carries the store's address:\n%s", kept.Manifest) } - if kept.Against[0] != "anchor.internal:5100/mesh-tools/runtime@"+aDigest { - t.Errorf("what the build stood on was rewritten: %v", kept.Against) + // What the build stood on is an edge to another module's artifact, and it is recorded the way + // that artifact is: by path in the store, so the edge still names the same thing when the + // store answers at another address. + if kept.Against[0] != catalogue.ArtifactStoreScheme+"mesh-tools/runtime@"+aDigest { + t.Errorf("what the build stood on was recorded by address: %v", kept.Against) } }