Share catalog-independent pipeline layout

This commit is contained in:
2026-11-26 02:33:25 +00:00
parent ad357db22d
commit 39e578dc60
8 changed files with 215 additions and 122 deletions

View File

@@ -0,0 +1,22 @@
package config
import (
"testing"
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
)
func TestValidateUsesMapIdentityWithoutMutatingProfile(t *testing.T) {
cfg := Default()
cfg.Pipelines[" demo "] = pipeline.PipelineProfile{Artifacts: map[string]pipeline.ArtifactLaneProfile{" lane ": {}}}
if err := cfg.Validate(); err != nil {
t.Fatal(err)
}
profile := cfg.Pipelines[" demo "]
if profile.ID != "" || len(profile.Artifacts) != 1 {
t.Fatalf("validation mutated profile: %#v", profile)
}
if _, ok := profile.Artifacts[" lane "]; !ok {
t.Fatalf("validation changed lane identity: %#v", profile.Artifacts)
}
}