mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +08:00
test/e2e: do not use /tmp for podman commands
Using the OS tempdir here is not good. This defaults to /tmp which means the inital podman test setup uses these paths: `--root /tmp/root --runroot /tmp/runroot and --tmpdir /tmp` Thus we create many files directly under /tmp. Also they were never removed thus leaked out. When running as root and then later as rooltess this would fail to permission problems. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -137,7 +137,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {
|
||||
// Cache images
|
||||
cwd, _ := os.Getwd()
|
||||
INTEGRATION_ROOT = filepath.Join(cwd, "../../")
|
||||
podman := PodmanTestSetup(os.TempDir())
|
||||
podman := PodmanTestSetup(GinkgoT().TempDir())
|
||||
|
||||
// Pull cirros but don't put it into the cache
|
||||
pullImages := []string{CIRROS_IMAGE, fedoraToolbox, volumeTest}
|
||||
@ -180,6 +180,9 @@ var _ = SynchronizedBeforeSuite(func() []byte {
|
||||
podman.StopRemoteService()
|
||||
}
|
||||
|
||||
// remove temporary podman files, images are now cached in ImageCacheDir
|
||||
podman.removeCache(podman.TempDir)
|
||||
|
||||
return []byte(path)
|
||||
}, func(data []byte) {
|
||||
cwd, _ := os.Getwd()
|
||||
|
Reference in New Issue
Block a user