Compose the complete example from native step fragments

This commit is contained in:
2026-11-17 20:54:47 +00:00
parent 8136b4814f
commit 5bab35f096
6 changed files with 59 additions and 39 deletions

View File

@@ -286,6 +286,13 @@ func completeExampleConfigWithTemporaryCache(t *testing.T) string {
if err := os.WriteFile(filepath.Join(root, "pipelines", "dnd-session.yml"), fragment, 0o600); err != nil {
t.Fatal(err)
}
description, err := os.ReadFile(repositoryPath("examples", "pipelines", "dnd-session.describe-session.yml"))
if err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(root, "pipelines", "dnd-session.describe-session.yml"), description, 0o600); err != nil {
t.Fatal(err)
}
path := filepath.Join(root, "dnd-complete.config.yml")
if err := os.WriteFile(path, []byte(updated), 0o600); err != nil {
t.Fatal(err)

View File

@@ -154,7 +154,7 @@ func TestRunRetainsDebugBundlesAcrossFailures(t *testing.T) {
root := filepath.Join(t.TempDir(), "debug")
var stdout, stderr bytes.Buffer
code := RunWithOptions([]string{"run", "sample", "--config", filepath.Join(t.TempDir(), "missing.yml"), "--input", "missing", "--debug", "--debug-dir", root}, &stdout, &stderr, newStateTestHarness().options())
if code != 1 || !strings.Contains(stderr.String(), "config file") {
if code != 1 || !strings.Contains(stderr.String(), "source.missing") {
t.Fatalf("code=%d stderr=%q", code, stderr.String())
}
assertAbsent(t, root)