Resolve pipeline resources from their source locations

This commit is contained in:
2026-11-17 22:09:58 +00:00
parent 6593ccbeaf
commit c3023cb609
10 changed files with 209 additions and 88 deletions

View File

@@ -338,7 +338,7 @@ whisperx:
}
}
func TestInheritedNotariusPathsKeepPipelineRootBase(t *testing.T) {
func TestInheritedNotariusPathsFollowSupplyingSource(t *testing.T) {
dir := t.TempDir()
pipelinePath := writePipelineFixture(t, dir, "pipeline.yml", `config:
imports:
@@ -364,9 +364,9 @@ notarius:
if err != nil {
t.Fatalf("LoadPipeline() error = %v", err)
}
wantConfigPath := filepath.Join(dir, "notarius", "config.yml")
wantConfigPath := filepath.Join(dir, "profiles", "notarius", "config.yml")
if cfg.Notarius.ConfigPath != wantConfigPath {
t.Fatalf("imported Notarius config_path = %q, want pipeline-root path %q", cfg.Notarius.ConfigPath, wantConfigPath)
t.Fatalf("imported Notarius config_path = %q, want source-relative path %q", cfg.Notarius.ConfigPath, wantConfigPath)
}
if got, want := cfg.Notarius.WorkingDirectory, filepath.Dir(wantConfigPath); got != want {
t.Fatalf("derived Notarius working_directory = %q, want pipeline-root directory %q", got, want)