diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-05-20 14:24:18 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-05-22 07:51:29 -0700 |
commit | f51e0d0597757da72fd7a10085998052684e396b (patch) | |
tree | 0f7b197097bbb9ec682c23a318e86d36b687018a /test/e2e/libpod_suite_remote_test.go | |
parent | 6aa802d8012a78ac95e4fe2017a5b54ec8d4b8de (diff) | |
download | podman-f51e0d0597757da72fd7a10085998052684e396b.tar.gz podman-f51e0d0597757da72fd7a10085998052684e396b.tar.bz2 podman-f51e0d0597757da72fd7a10085998052684e396b.zip |
V2 enable remote logs and testing
* wire up bindings and handler for obtaining logs remotely
* enable debug logging from podman in e2e test using DEBUG and
DEBUG_SERVICE env variables
* Fix error in streaming log frames
* enable remote logs test
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/e2e/libpod_suite_remote_test.go')
-rw-r--r-- | test/e2e/libpod_suite_remote_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go index 79d18115c..e8cdf91ee 100644 --- a/test/e2e/libpod_suite_remote_test.go +++ b/test/e2e/libpod_suite_remote_test.go @@ -89,10 +89,17 @@ func (p *PodmanTestIntegration) StartRemoteService() { if os.Geteuid() == 0 { os.MkdirAll("/run/podman", 0755) } + + args := []string{} + if _, found := os.LookupEnv("DEBUG_SERVICE"); found { + args = append(args, "--log-level", "debug") + } remoteSocket := p.RemoteSocket - args := []string{"system", "service", "--timeout", "0", remoteSocket} + args = append(args, "system", "service", "--timeout", "0", remoteSocket) podmanOptions := getRemoteOptions(p, args) command := exec.Command(p.PodmanBinary, podmanOptions...) + command.Stdout = os.Stdout + command.Stderr = os.Stderr fmt.Printf("Running: %s %s\n", p.PodmanBinary, strings.Join(podmanOptions, " ")) command.Start() command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} |