distribution serves name-of: the reference it keeps an upstream copy under
The node-engine composes an upstream artifact's image from the holder's own name for the copy; distribution owns that naming (ParseSource, Source.Name), so it answers it on the image seat rather than another module repeating the rule. Builds: design 47 H2 H-A-513 second addendum
This commit is contained in:
@@ -34,7 +34,7 @@ func jsonFields(v any) map[string]bool {
|
||||
func TestTheVerbsSpeakTheSeatsContract(t *testing.T) {
|
||||
inputs := map[string]any{reg.VerbPublish: reg.PublishInput{}, reg.VerbPublishPart: reg.PublishPartInput{},
|
||||
reg.VerbVersions: reg.VersionsInput{}, reg.VerbRemove: reg.RemoveInput{}, reg.VerbHold: reg.HoldInput{},
|
||||
reg.VerbRelease: reg.ReleaseInput{}, reg.VerbMirror: reg.MirrorInput{}, reg.VerbTags: reg.TagsInput{}}
|
||||
reg.VerbRelease: reg.ReleaseInput{}, reg.VerbMirror: reg.MirrorInput{}, reg.VerbNameOf: reg.NameOfInput{}, reg.VerbTags: reg.TagsInput{}}
|
||||
seen := 0
|
||||
for _, tool := range tools(&holder.Verbs{}, kept[holder.Window]{}, nil) {
|
||||
seat, verb, ok := strings.Cut(tool.Name, ".")
|
||||
@@ -51,8 +51,8 @@ func TestTheVerbsSpeakTheSeatsContract(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if seen != 14 {
|
||||
t.Errorf("%d seat verbs served, want 14 (8 on the image seat, 6 on the artifact seat)", seen)
|
||||
if seen != 15 {
|
||||
t.Errorf("%d seat verbs served, want 15 (9 on the image seat, 6 on the artifact seat)", seen)
|
||||
}
|
||||
for event, want := range map[string]any{holder.EventPublished: ®.Outcome{}, holder.EventKept: ®.KeptEvent{}, holder.EventHeld: ®.Hold{}, holder.EventReleased: ®.Hold{}} {
|
||||
b, _ := json.Marshal(eventBody(event, holder.Event{Name: "m/a", Kind: holder.KindArchive, Digest: "sha256:aa", Holder: holder.Self, By: "x.artifact-store-tools"}))
|
||||
|
||||
Reference in New Issue
Block a user