summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-09-26 10:35:16 -0400
committerChris Evich <cevich@redhat.com>2019-09-26 10:56:24 -0400
commit437d9d2cdeae7ffa01dbe06f96d155f1da36a689 (patch)
tree75caab41fa20b42c6ec73403f91a258dd28ac2a6 /test/e2e/libpod_suite_test.go
parentd76b21e27a7cef26865a05be02632ca76f9cf2ea (diff)
downloadpodman-437d9d2cdeae7ffa01dbe06f96d155f1da36a689.tar.gz
podman-437d9d2cdeae7ffa01dbe06f96d155f1da36a689.tar.bz2
podman-437d9d2cdeae7ffa01dbe06f96d155f1da36a689.zip
Move noCache logic lower in stack
One or more tests are not taking advantage of the local image cache. This has been observed to cause a testing flake in at least one `--sigproxy` test which uses `PodmanTestIntegration.PodmanPID()`. It has a rather short timeout of 15-seconds, which isn't always enough time to pull down a remote image. Fix this by reloacing the `noCache` logic from `PodmanTest.PodmanAsUserBase()` down the stack into `PodmanTestIntegration.makeOptions()`. This also eliminates the need to also check if a remote-client is being used - since it uses a different function. Also reverse the parameter order in `PodmanTest.PodmanBase` so that everywhere is consistently `noEvents` then `noCache`. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 1df59dbe3..5239f4d8e 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -29,7 +29,7 @@ func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration
// PodmanNoCache calls the podman command with no configured imagecache
func (p *PodmanTestIntegration) PodmanNoCache(args []string) *PodmanSessionIntegration {
- podmanSession := p.PodmanBase(args, true, false)
+ podmanSession := p.PodmanBase(args, false, true)
return &PodmanSessionIntegration{podmanSession}
}
@@ -66,7 +66,7 @@ func PodmanTestCreate(tempDir string) *PodmanTestIntegration {
}
// MakeOptions assembles all the podman main options
-func (p *PodmanTestIntegration) makeOptions(args []string, noEvents bool) []string {
+func (p *PodmanTestIntegration) makeOptions(args []string, noEvents, noCache bool) []string {
var debug string
if _, ok := os.LookupEnv("DEBUG"); ok {
debug = "--log-level=debug --syslog=true "
@@ -84,6 +84,11 @@ func (p *PodmanTestIntegration) makeOptions(args []string, noEvents bool) []stri
}
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
+ if !noCache {
+ cacheOptions := []string{"--storage-opt",
+ fmt.Sprintf("%s.imagestore=%s", p.PodmanTest.ImageCacheFS, p.PodmanTest.ImageCacheDir)}
+ podmanOptions = append(cacheOptions, podmanOptions...)
+ }
podmanOptions = append(podmanOptions, args...)
return podmanOptions
}