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:
parent
11717741fd
commit
c3e28351a1
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue