Align internal publish terminology across stage, app, and artifacts
This commit is contained in:
@@ -153,7 +153,7 @@ storage:
|
||||
}
|
||||
}
|
||||
|
||||
func TestSpoolAndArchiveDefaults(t *testing.T) {
|
||||
func TestSpoolAndPublishDefaults(t *testing.T) {
|
||||
pipelinePath, sessionPath := writeConfigFiles(t, testPipelineBaseYAML, testSessionBaseYAML)
|
||||
|
||||
cfg, err := Load(pipelinePath, sessionPath)
|
||||
@@ -171,13 +171,13 @@ func TestSpoolAndArchiveDefaults(t *testing.T) {
|
||||
t.Fatalf("workspace.cleanup_after_publish = true, want false")
|
||||
}
|
||||
if cfg.Pipeline.Publish == nil {
|
||||
t.Fatal("archive should be initialized by defaults")
|
||||
t.Fatal("publish should be initialized by defaults")
|
||||
}
|
||||
if cfg.Pipeline.Publish.Enabled == nil || !*cfg.Pipeline.Publish.Enabled {
|
||||
t.Fatalf("archive.enabled = %#v, want true", cfg.Pipeline.Publish.Enabled)
|
||||
t.Fatalf("publish.enabled = %#v, want true", cfg.Pipeline.Publish.Enabled)
|
||||
}
|
||||
if cfg.Pipeline.Publish.UploadRun == nil || !*cfg.Pipeline.Publish.UploadRun {
|
||||
t.Fatalf("archive.upload_run = %#v, want true", cfg.Pipeline.Publish.UploadRun)
|
||||
t.Fatalf("publish.upload_run = %#v, want true", cfg.Pipeline.Publish.UploadRun)
|
||||
}
|
||||
if len(cfg.Pipeline.Publish.Outputs) != 1 {
|
||||
t.Fatalf("publish.outputs len = %d, want 1 default", len(cfg.Pipeline.Publish.Outputs))
|
||||
@@ -194,7 +194,7 @@ func TestSpoolAndArchiveDefaults(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchivePromotionValidation(t *testing.T) {
|
||||
func TestPublishOutputValidation(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
ruleYML string
|
||||
@@ -278,7 +278,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchivePromotionLegacyTranscriptSourcesRejected(t *testing.T) {
|
||||
func TestPublishOutputLegacyTranscriptSourcesRejected(t *testing.T) {
|
||||
legacyTranscriptSources := []string{
|
||||
"narratio.transcript." + "merged",
|
||||
"narratio.transcript." + "full",
|
||||
@@ -307,7 +307,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchivePromotionDerivesDestinationWhenOmitted(t *testing.T) {
|
||||
func TestPublishOutputDerivesDestinationWhenOmitted(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
pipelineYML string
|
||||
@@ -359,7 +359,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchiveLockValidation(t *testing.T) {
|
||||
func TestPublishLockValidation(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
pipelineYML string
|
||||
@@ -439,7 +439,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchiveLockLegacyTranscriptSourcesRejected(t *testing.T) {
|
||||
func TestPublishLockLegacyTranscriptSourcesRejected(t *testing.T) {
|
||||
legacyTranscriptSources := []string{
|
||||
"narratio.transcript." + "merged",
|
||||
"narratio.transcript." + "full",
|
||||
@@ -467,7 +467,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchiveLockUnknownFieldFailsStrictDecode(t *testing.T) {
|
||||
func TestPublishLockUnknownFieldFailsStrictDecode(t *testing.T) {
|
||||
pipelineYAML := testPipelineBaseYAML + `
|
||||
publish:
|
||||
locks:
|
||||
@@ -481,7 +481,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchiveLegacyFromToFailsStrictDecode(t *testing.T) {
|
||||
func TestPublishLegacyFromToFailsStrictDecode(t *testing.T) {
|
||||
pipelineYAML := testPipelineBaseYAML + `
|
||||
publish:
|
||||
outputs:
|
||||
@@ -495,7 +495,7 @@ publish:
|
||||
}
|
||||
}
|
||||
|
||||
func TestArchiveLockStoreBytesStrictDecodeAndValidation(t *testing.T) {
|
||||
func TestPublishLockStoreBytesStrictDecodeAndValidation(t *testing.T) {
|
||||
store, err := LoadPublishLockStoreBytes("locks.yml", []byte(`locks:
|
||||
- source: narratio.transcript.final_trimmed
|
||||
reason: reviewed
|
||||
@@ -524,7 +524,7 @@ func TestArchiveLockStoreBytesStrictDecodeAndValidation(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMergeArchiveLockRulesStaticWins(t *testing.T) {
|
||||
func TestMergePublishLockRulesStaticWins(t *testing.T) {
|
||||
merged := MergePublishLockRules(
|
||||
[]PublishLockRule{{Source: "narratio.transcript.final_trimmed", Reason: "static"}},
|
||||
[]PublishLockRule{
|
||||
Reference in New Issue
Block a user