Share artifact dependency queries across consumers
This commit is contained in:
@@ -70,6 +70,7 @@ func TestProjectionUsesInjectedSnapshotAndSchedulesPrerequisites(t *testing.T) {
|
||||
"prerequisite": {Enabled: false, PromptID: "parent", OutputPath: "artifacts/parent.md"},
|
||||
"target": {Enabled: true, PromptID: "child", OutputPath: "artifacts/child.md", DependsOn: []string{"prerequisite"}},
|
||||
}
|
||||
rebuildTestArtifactGraph(t, cfg)
|
||||
selection := []string{"target"}
|
||||
effective, err := resolveEffectiveArtifacts(cfg, selection)
|
||||
if err != nil {
|
||||
@@ -310,3 +311,12 @@ func planFixtureFiles(t *testing.T, root string) []string {
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
func rebuildTestArtifactGraph(t *testing.T, cfg *config.Config) {
|
||||
t.Helper()
|
||||
graph, err := config.BuildArtifactGraph(cfg.ArtifactCatalog.Artifacts)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cfg.ArtifactCatalog.Graph = graph
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user