mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
TestBuildAddTarXz: xz with '-k' due to msys bug
TestBuildAddTarXz/TestBuildAddTarXzGz make exec calls like 'cd %SOME_TEMP_DIR%; xz test.gz' but this fails when called from integration-cli tests (doesn't fail from msys or cmd shell). It fails with error: "xz: test.tar: Cannot remove: Permission denied." Proposing workaround of using the `xz --keep` argument since keeping test.tar is harmless and it's already in os.TempDir(). Signed-off-by: Ahmet Alp Balkan <ahmetalpbalkan@gmail.com>
This commit is contained in:
parent
65623e22aa
commit
2f53820ce4
1 changed files with 2 additions and 2 deletions
|
@ -3877,7 +3877,7 @@ func TestBuildAddTarXz(t *testing.T) {
|
|||
if err := tw.Close(); err != nil {
|
||||
t.Fatalf("failed to close tar archive: %v", err)
|
||||
}
|
||||
xzCompressCmd := exec.Command("xz", "test.tar")
|
||||
xzCompressCmd := exec.Command("xz", "-k", "test.tar")
|
||||
xzCompressCmd.Dir = tmpDir
|
||||
out, _, err := runCommandWithOutput(xzCompressCmd)
|
||||
if err != nil {
|
||||
|
@ -3930,7 +3930,7 @@ func TestBuildAddTarXzGz(t *testing.T) {
|
|||
t.Fatalf("failed to close tar archive: %v", err)
|
||||
}
|
||||
|
||||
xzCompressCmd := exec.Command("xz", "test.tar")
|
||||
xzCompressCmd := exec.Command("xz", "-k", "test.tar")
|
||||
xzCompressCmd.Dir = tmpDir
|
||||
out, _, err := runCommandWithOutput(xzCompressCmd)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue