Strengthen template planning, reuse and independent review
This commit is contained in:
@@ -3,6 +3,7 @@ package pipeline
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.a-wan.net/alan/pipelines/internal/protocol"
|
||||
@@ -24,6 +25,9 @@ func TestShowcaseDefinitions(t *testing.T) {
|
||||
if stage.FallbackError {
|
||||
t.Fatalf("%s should declare its error route explicitly", stage.Key)
|
||||
}
|
||||
if strings.TrimSpace(stage.Output) == "" || strings.TrimSpace(stage.Prompt) == "" {
|
||||
t.Fatalf("%s stage %s needs a nonempty output and prompt", name, stage.Key)
|
||||
}
|
||||
for _, target := range stage.Edges {
|
||||
if target == protocol.SuccessEnd {
|
||||
success = true
|
||||
@@ -36,6 +40,9 @@ func TestShowcaseDefinitions(t *testing.T) {
|
||||
if !success || !failure {
|
||||
t.Fatal("showcase must have both terminal outcomes")
|
||||
}
|
||||
if graph.Settings != nil {
|
||||
t.Fatalf("%s starters must stay manual-only", name)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user