integ-cli: remove bash dependency from TestSaveDirectoryPermissions

Use the new `runCommandPipelineWithOutput` helper to
remove bash dependency required for piping in
`TestSaveDirectoryPermissions`.

Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
Ahmet Alp Balkan 2015-02-24 15:52:06 -08:00
parent 11717741fd
commit c3e28351a1
1 changed files with 4 additions and 3 deletions

View File

@ -376,9 +376,10 @@ func TestSaveDirectoryPermissions(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
saveCmdFinal := fmt.Sprintf("%s save %s | tar -xf - -C %s", dockerBinary, name, extractionDirectory) if out, _, err := runCommandPipelineWithOutput(
saveCmd := exec.Command("bash", "-c", saveCmdFinal) exec.Command(dockerBinary, "save", name),
if out, _, err := runCommandWithOutput(saveCmd); err != nil { exec.Command("tar", "-xf", "-", "-C", extractionDirectory),
); err != nil {
t.Errorf("failed to save and extract image: %s", out) t.Errorf("failed to save and extract image: %s", out)
} }