Skip to content

Commit

Permalink
Fix inventory test
Browse files Browse the repository at this point in the history
  • Loading branch information
mingan committed Apr 15, 2018
1 parent bbaf7c5 commit c54ab0e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/sup/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"

"github.com/adammck/venv"
"os/exec"
)

const (
Expand Down Expand Up @@ -545,13 +546,20 @@ commands:
func TestInventory(t *testing.T) {
t.Parallel()

cmd := exec.Command("/bin/sh", "-c", "array=( 0 2 ); for i in \"${array[@]}\"; do printf \"server$i\n# comment\n\n\"; done")
stdoutStderr, err := cmd.CombinedOutput()
t.Log(string(stdoutStderr))
if err != nil {
t.Fatal(err)
}

input := `
---
version: 0.4
networks:
staging:
inventory: array=( 0 2 ); for i in "${array[@]}"; do printf "server$i\n\n# comment\n"; done
inventory: array=( 0 2 ); for i in "${array[@]}"; do printf "server$i\n# comment\n\n"; done
commands:
step1:
Expand Down

0 comments on commit c54ab0e

Please sign in to comment.