1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

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

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)
}