podman-remote pause|unpause

Add the ability to pause and unpause containers with the remote client.

Also turned on the pause tests!

Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
baude
2019-04-15 09:03:18 -05:00
parent bf5ffdafb4
commit 55e630e787
17 changed files with 452 additions and 364 deletions

View File

@ -4,6 +4,7 @@ import (
"bufio"
"encoding/json"
"fmt"
"github.com/containers/libpod/pkg/rootless"
"io/ioutil"
"os"
"os/exec"
@ -40,6 +41,7 @@ type PodmanTest struct {
RemoteTest bool
RemotePodmanBinary string
VarlinkSession *os.Process
VarlinkEndpoint string
}
// PodmanSession wraps the gexec.session so we can extend it
@ -67,7 +69,11 @@ func (p *PodmanTest) PodmanAsUserBase(args []string, uid, gid uint32, cwd string
podmanBinary := p.PodmanBinary
if p.RemoteTest {
podmanBinary = p.RemotePodmanBinary
if !rootless.IsRootless() {
env = append(env, fmt.Sprintf("PODMAN_VARLINK_ADDRESS=%s", p.VarlinkEndpoint))
}
}
if env == nil {
fmt.Printf("Running: %s %s\n", podmanBinary, strings.Join(podmanOptions, " "))
} else {