test: honor TEMPDIR variable

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2020-01-29 22:06:32 +01:00
committed by Brent Baude
parent eb28365703
commit f8067d70b0

View File

@ -62,6 +62,12 @@ func (b *bindingTest) runPodman(command []string) *gexec.Session {
} else {
cmd = append(cmd, "--runroot", b.runRoot)
}
val, ok = os.LookupEnv("TEMPDIR")
if ok {
cmd = append(cmd, "--tmpdir", val)
} else {
cmd = append(cmd, "--tmpdir", b.tempDirPath)
}
val, ok = os.LookupEnv("STORAGE_DRIVER")
if ok {
cmd = append(cmd, "--storage-driver", val)