summaryrefslogtreecommitdiff
path: root/test/e2e/libpod_suite_remoteclient_test.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-01-18 09:09:18 -0600
committerbaude <bbaude@redhat.com>2019-01-19 13:12:32 -0600
commit6f6cf86d8f1b916940ffc6eb79a763140bb86eca (patch)
treeb66d5822c0e9878db951acc4fb00bf7578568bfd /test/e2e/libpod_suite_remoteclient_test.go
parente3dc6609d05695e649e76d4505e4761cafebcef6 (diff)
downloadpodman-6f6cf86d8f1b916940ffc6eb79a763140bb86eca.tar.gz
podman-6f6cf86d8f1b916940ffc6eb79a763140bb86eca.tar.bz2
podman-6f6cf86d8f1b916940ffc6eb79a763140bb86eca.zip
Mask unimplemeted commands for remote client
Masking main level, image, and container commands that are not yet implemented for the remote client. As each command is completed, be sure to unmask it. Also, masking podman command line switches that are not applicable to the remote client. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_remoteclient_test.go')
-rw-r--r--test/e2e/libpod_suite_remoteclient_test.go33
1 files changed, 32 insertions, 1 deletions
diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go
index cad4401f8..c1ad72ff3 100644
--- a/test/e2e/libpod_suite_remoteclient_test.go
+++ b/test/e2e/libpod_suite_remoteclient_test.go
@@ -143,7 +143,7 @@ func (p *PodmanTestIntegration) StartVarlink() {
os.MkdirAll("/run/podman", 0755)
}
args := []string{"varlink", "--timeout", "0", "unix:/run/podman/io.podman"}
- podmanOptions := p.MakeOptions(args)
+ podmanOptions := getVarlinkOptions(p, args)
command := exec.Command(p.PodmanBinary, podmanOptions...)
fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
command.Start()
@@ -155,3 +155,34 @@ func (p *PodmanTestIntegration) StopVarlink() {
varlinkSession.Kill()
varlinkSession.Wait()
}
+
+//MakeOptions assembles all the podman main options
+func (p *PodmanTestIntegration) makeOptions(args []string) []string {
+ return args
+}
+
+//MakeOptions assembles all the podman main options
+func getVarlinkOptions(p *PodmanTestIntegration, args []string) []string {
+ podmanOptions := strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s --cgroup-manager %s",
+ p.CrioRoot, p.RunRoot, p.RunCBinary, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager), " ")
+ if os.Getenv("HOOK_OPTION") != "" {
+ podmanOptions = append(podmanOptions, os.Getenv("HOOK_OPTION"))
+ }
+ podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
+ 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)
+ dest := strings.Split(image, "/")
+ destName := fmt.Sprintf("/tmp/%s.tar", strings.Replace(strings.Join(strings.Split(dest[len(dest)-1], "/"), ""), ":", "-", -1))
+ args := []string{"load", "-q", "-i", destName}
+ podmanOptions := getVarlinkOptions(p, args)
+ command := exec.Command(p.PodmanBinary, podmanOptions...)
+ fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " "))
+ command.Start()
+ command.Wait()
+ return nil
+}