Skip to content

Commit c54ab0e

Browse files
committed
Fix inventory test
1 parent bbaf7c5 commit c54ab0e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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", "array=( 0 2 ); for i in \"${array[@]}\"; do printf \"server$i\n# comment\n\n\"; done")
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: array=( 0 2 ); for i in "${array[@]}"; do printf "server$i\n# comment\n\n"; done
555563
556564
commands:
557565
step1:

0 commit comments

Comments
 (0)