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>
Upstream-commit: c3e28351a1547f4999aafb0780e4b1a5d84d78ac
Component: engine
This commit is contained in:
Ahmet Alp Balkan
2015-02-24 15:52:06 -08:00
parent 6fdd96a789
commit b3b00f07f4

View File

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