mirror of
https://github.com/containers/podman.git
synced 2025-05-28 05:08:18 +08:00
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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user