From 9955a2f10c034dac60bc17cde6b80b432e21d9d3 Mon Sep 17 00:00:00 2001 From: Claudomator Date: Sun, 8 Mar 2026 07:47:17 +0000 Subject: security(cli): validate --parallel flag is positive in run command Co-Authored-By: Claude Sonnet 4.6 --- internal/cli/run_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/cli/run_test.go (limited to 'internal/cli/run_test.go') diff --git a/internal/cli/run_test.go b/internal/cli/run_test.go new file mode 100644 index 0000000..705fe29 --- /dev/null +++ b/internal/cli/run_test.go @@ -0,0 +1,18 @@ +package cli + +import ( + "strings" + "testing" +) + +func TestRunTasks_InvalidParallel(t *testing.T) { + for _, parallel := range []int{0, -1, -100} { + err := runTasks("ignored.yaml", parallel, false) + if err == nil { + t.Fatalf("parallel=%d: expected error, got nil", parallel) + } + if !strings.Contains(err.Error(), "--parallel") { + t.Errorf("parallel=%d: error should mention --parallel flag, got: %v", parallel, err) + } + } +} -- cgit v1.2.3