summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_test.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-10-27 09:14:53 -0500
committerbaude <bbaude@redhat.com>2020-11-16 08:15:44 -0600
commit15539c1c4bdb10095bb4d30c6283795dac657600 (patch)
tree6a0090d6ab89eb7665067ce32194f45b9dfe38da /test/e2e/libpod_suite_test.go
parent392075631a284617b7e37b8bdfb3157f5918cdec (diff)
downloadpodman-15539c1c4bdb10095bb4d30c6283795dac657600.tar.gz
podman-15539c1c4bdb10095bb4d30c6283795dac657600.tar.bz2
podman-15539c1c4bdb10095bb4d30c6283795dac657600.zip
use lookaside storage for remote tests
in an effort to speed up the remote testing, we should be using lookaside storage to avoid pull images as well as importing multiple images into the RW store. one test was removed and added into system test by Ed in #8325 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_test.go')
-rw-r--r--test/e2e/libpod_suite_test.go68
1 files changed, 0 insertions, 68 deletions
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index a9da922de..c37b24ab6 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -29,19 +29,6 @@ func (p *PodmanTestIntegration) PodmanExtraFiles(args []string, extraFiles []*os
return &PodmanSessionIntegration{podmanSession}
}
-// PodmanNoCache calls the podman command with no configured imagecache
-func (p *PodmanTestIntegration) PodmanNoCache(args []string) *PodmanSessionIntegration {
- podmanSession := p.PodmanBase(args, false, true)
- return &PodmanSessionIntegration{podmanSession}
-}
-
-// PodmanNoEvents calls the Podman command without an imagecache and without an
-// events backend. It is used mostly for caching and uncaching images.
-func (p *PodmanTestIntegration) PodmanNoEvents(args []string) *PodmanSessionIntegration {
- podmanSession := p.PodmanBase(args, true, true)
- return &PodmanSessionIntegration{podmanSession}
-}
-
func (p *PodmanTestIntegration) setDefaultRegistriesConfigEnv() {
defaultFile := filepath.Join(INTEGRATION_ROOT, "test/registries.conf")
os.Setenv("REGISTRIES_CONFIG_PATH", defaultFile)
@@ -61,34 +48,6 @@ func PodmanTestCreate(tempDir string) *PodmanTestIntegration {
return PodmanTestCreateUtil(tempDir, false)
}
-// MakeOptions assembles all the podman main options
-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 "
- }
-
- eventsType := "file"
- if noEvents {
- eventsType = "none"
- }
-
- podmanOptions := strings.Split(fmt.Sprintf("%s--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s --cgroup-manager %s --tmpdir %s --events-backend %s",
- debug, p.CrioRoot, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager, p.TmpDir, eventsType), " ")
- if os.Getenv("HOOK_OPTION") != "" {
- podmanOptions = append(podmanOptions, os.Getenv("HOOK_OPTION"))
- }
-
- 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
-}
-
// RestoreArtifact puts the cached image into our test store
func (p *PodmanTestIntegration) RestoreArtifact(image string) error {
fmt.Printf("Restoring %s...\n", image)
@@ -99,36 +58,9 @@ func (p *PodmanTestIntegration) RestoreArtifact(image string) error {
return nil
}
-// RestoreArtifactToCache populates the imagecache from tarballs that were cached earlier
-func (p *PodmanTestIntegration) RestoreArtifactToCache(image string) error {
- fmt.Printf("Restoring %s...\n", image)
- dest := strings.Split(image, "/")
- destName := fmt.Sprintf("/tmp/%s.tar", strings.Replace(strings.Join(strings.Split(dest[len(dest)-1], "/"), ""), ":", "-", -1))
-
- p.CrioRoot = p.ImageCacheDir
- restore := p.PodmanNoEvents([]string{"load", "-q", "-i", destName})
- restore.WaitWithDefaultTimeout()
- return nil
-}
-
func (p *PodmanTestIntegration) StopRemoteService() {}
func (p *PodmanTestIntegration) DelayForVarlink() {}
-func populateCache(podman *PodmanTestIntegration) {
- for _, image := range CACHE_IMAGES {
- podman.RestoreArtifactToCache(image)
- }
- // logformatter uses this to recognize the first test
- fmt.Printf("-----------------------------\n")
-}
-
-func removeCache() {
- // Remove cache dirs
- if err := os.RemoveAll(ImageCacheDir); err != nil {
- fmt.Printf("%q\n", err)
- }
-}
-
// SeedImages is a no-op for localized testing
func (p *PodmanTestIntegration) SeedImages() error {
return nil