summaryrefslogtreecommitdiff
path: root/pkg/bindings/test/containers_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-04 18:40:21 +0100
committerGitHub <noreply@github.com>2021-11-04 18:40:21 +0100
commit28bbd146853166463c060fa93714330fe63e1040 (patch)
treefef1a8d72dcec0fd38d3535f091208577e8582e2 /pkg/bindings/test/containers_test.go
parentc0351a75ae1e4a74a633ac95f1d2ca9c7d96f044 (diff)
parentba8eba83ef1655f276680a77512d1f8655d6018b (diff)
downloadpodman-28bbd146853166463c060fa93714330fe63e1040.tar.gz
podman-28bbd146853166463c060fa93714330fe63e1040.tar.bz2
podman-28bbd146853166463c060fa93714330fe63e1040.zip
Merge pull request #12177 from Luap99/log-test
Fix bindings container log test
Diffstat (limited to 'pkg/bindings/test/containers_test.go')
-rw-r--r--pkg/bindings/test/containers_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go
index b9ed67255..0f535bc31 100644
--- a/pkg/bindings/test/containers_test.go
+++ b/pkg/bindings/test/containers_test.go
@@ -259,6 +259,7 @@ var _ = Describe("Podman containers ", func() {
_, err = bt.RunTopContainer(&name, nil)
Expect(err).To(BeNil())
go func() {
+ defer GinkgoRecover()
exitCode, err = containers.Wait(bt.conn, name, nil)
errChan <- err
close(errChan)
@@ -281,6 +282,7 @@ var _ = Describe("Podman containers ", func() {
_, err := bt.RunTopContainer(&name, nil)
Expect(err).To(BeNil())
go func() {
+ defer GinkgoRecover()
exitCode, err = containers.Wait(bt.conn, name, new(containers.WaitOptions).WithCondition([]define.ContainerStatus{pause}))
errChan <- err
close(errChan)
@@ -366,7 +368,10 @@ var _ = Describe("Podman containers ", func() {
opts := new(containers.LogOptions).WithStdout(true).WithFollow(true)
go func() {
- containers.Logs(bt.conn, r.ID, opts, stdoutChan, nil)
+ defer GinkgoRecover()
+ err := containers.Logs(bt.conn, r.ID, opts, stdoutChan, nil)
+ close(stdoutChan)
+ Expect(err).ShouldNot(HaveOccurred())
}()
o := <-stdoutChan
o = strings.TrimSpace(o)