summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-04-20 10:02:05 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-04-21 10:54:18 +0000
commit69669cf394c25ceed85a05687fe46d5e64583f55 (patch)
tree2efdc992d8765dd692b8067ec49a98743b0e2677 /test/e2e
parent9b457e3f70dcf3ee2a6efee389c928383b62c70c (diff)
downloadpodman-69669cf394c25ceed85a05687fe46d5e64583f55.tar.gz
podman-69669cf394c25ceed85a05687fe46d5e64583f55.tar.bz2
podman-69669cf394c25ceed85a05687fe46d5e64583f55.zip
enable no test cache
been meaning to do this for a while. add an environment variable that disables the caching and restoring of images before integration tests are run. this is useful for developers only ... when testing specific integration tests where caching and restoring the images is not worth the benefit. Signed-off-by: baude <bbaude@redhat.com> Closes: #650 Approved by: rhatdan
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/libpod_suite_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 1d770accd..1383b5a19 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -111,7 +111,6 @@ var _ = BeforeSuite(func() {
}
}
for _, image := range CACHE_IMAGES {
- fmt.Printf("Caching %s...\n", image)
if err := podman.CreateArtifact(image); err != nil {
fmt.Printf("%q\n", err)
os.Exit(1)
@@ -300,6 +299,10 @@ func (p *PodmanTest) SystemExec(command string, args []string) *PodmanSession {
// CreateArtifact creates a cached image in the artifact dir
func (p *PodmanTest) CreateArtifact(image string) error {
+ if os.Getenv("NO_TEST_CACHE") != "" {
+ return nil
+ }
+ fmt.Printf("Caching %s...\n", image)
imageName := fmt.Sprintf("docker://%s", image)
systemContext := types.SystemContext{
SignaturePolicyPath: p.SignaturePolicyPath,
@@ -387,6 +390,9 @@ func (p *PodmanTest) RestoreArtifact(image string) error {
// RestoreAllArtifacts unpacks all cached images
func (p *PodmanTest) RestoreAllArtifacts() error {
+ if os.Getenv("NO_TEST_CACHE") != "" {
+ return nil
+ }
for _, image := range RESTORE_IMAGES {
if err := p.RestoreArtifact(image); err != nil {
return err