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:
parent
11717741fd
commit
c3e28351a1
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue