Skip to content

Commit e86a6ec

Browse files
committed
Fix inventory test
1 parent bbaf7c5 commit e86a6ec

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

cmd/sup/main_test.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/adammck/venv"
13+
"os/exec"
1314
)
1415

1516
const (
@@ -545,13 +546,20 @@ commands:
545546
func TestInventory(t *testing.T) {
546547
t.Parallel()
547548

549+
cmd := exec.Command("/bin/sh", "-c", "echo \"server0\n# comment\n\nserver2\n\"")
550+
stdoutStderr, err := cmd.CombinedOutput()
551+
t.Log(string(stdoutStderr))
552+
if err != nil {
553+
t.Fatal(err)
554+
}
555+
548556
input := `
549557
---
550558
version: 0.4
551559
552560
networks:
553561
staging:
554-
inventory: array=( 0 2 ); for i in "${array[@]}"; do printf "server$i\n\n# comment\n"; done
562+
inventory: echo "server0\n# comment\n\nserver2\n"
555563
556564
commands:
557565
step1:

0 commit comments

Comments
 (0)