Cleaned up and removed legacy configuration surfaces

This commit is contained in:
2026-05-22 18:32:14 -05:00
parent 591c529a09
commit e920f3a8d5
23 changed files with 239 additions and 199 deletions

View File

@@ -39,6 +39,49 @@ storage:
}
}
func TestStorageLegacyTopLevelFieldsFailStrictDecode(t *testing.T) {
tests := []struct {
name string
storageYAML string
wantField string
}{
{
name: "bucket",
storageYAML: `
storage:
bucket: my-dnd-archive
`,
wantField: "bucket",
},
{
name: "prefix",
storageYAML: `
storage:
prefix: dnd
`,
wantField: "prefix",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
pipelineYAML := testPipelineBaseYAML + tt.storageYAML
pipelinePath, _ := writeConfigFiles(t, pipelineYAML, testSessionBaseYAML)
_, err := LoadPipeline(pipelinePath)
if err == nil {
t.Fatal("LoadPipeline() error = nil, want strict decode error")
}
if !strings.Contains(err.Error(), "strict decode failed") {
t.Fatalf("LoadPipeline() error = %v, want strict decode failed", err)
}
if !strings.Contains(err.Error(), tt.wantField) {
t.Fatalf("LoadPipeline() error = %v, want field %q", err, tt.wantField)
}
})
}
}
func TestStorageS3CredentialEnvNamesLoadAndValidate(t *testing.T) {
pipelineYAML := testPipelineBaseYAML + `
storage: