summaryrefslogtreecommitdiff
path: root/pkg/bindings/test
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/bindings/test')
-rw-r--r--pkg/bindings/test/attach_test.go8
-rw-r--r--pkg/bindings/test/auth_test.go6
-rw-r--r--pkg/bindings/test/common_test.go8
-rw-r--r--pkg/bindings/test/containers_test.go12
-rw-r--r--pkg/bindings/test/create_test.go4
-rw-r--r--pkg/bindings/test/exec_test.go6
-rw-r--r--pkg/bindings/test/images_test.go8
-rw-r--r--pkg/bindings/test/info_test.go8
-rw-r--r--pkg/bindings/test/manifests_test.go8
-rw-r--r--pkg/bindings/test/pods_test.go8
-rw-r--r--pkg/bindings/test/system_test.go41
-rw-r--r--pkg/bindings/test/volumes_test.go8
12 files changed, 66 insertions, 59 deletions
diff --git a/pkg/bindings/test/attach_test.go b/pkg/bindings/test/attach_test.go
index dcc6b5f8e..12e51e734 100644
--- a/pkg/bindings/test/attach_test.go
+++ b/pkg/bindings/test/attach_test.go
@@ -5,10 +5,10 @@ import (
"fmt"
"time"
- "github.com/containers/libpod/v2/libpod/define"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/auth_test.go b/pkg/bindings/test/auth_test.go
index 6a5c2e831..4565b82b0 100644
--- a/pkg/bindings/test/auth_test.go
+++ b/pkg/bindings/test/auth_test.go
@@ -7,9 +7,9 @@ import (
"github.com/containers/common/pkg/auth"
"github.com/containers/image/v5/types"
- podmanRegistry "github.com/containers/libpod/v2/hack/podman-registry-go"
- "github.com/containers/libpod/v2/pkg/bindings/images"
- "github.com/containers/libpod/v2/pkg/domain/entities"
+ podmanRegistry "github.com/containers/podman/v2/hack/podman-registry-go"
+ "github.com/containers/podman/v2/pkg/bindings/images"
+ "github.com/containers/podman/v2/pkg/domain/entities"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go
index 831ecfd31..9dff2985f 100644
--- a/pkg/bindings/test/common_test.go
+++ b/pkg/bindings/test/common_test.go
@@ -9,10 +9,10 @@ import (
"path/filepath"
"strings"
- "github.com/containers/libpod/v2/libpod/define"
- . "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/podman/v2/libpod/define"
+ . "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/specgen"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega/gexec"
"github.com/pkg/errors"
diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go
index 4b2c78353..c1a01c280 100644
--- a/pkg/bindings/test/containers_test.go
+++ b/pkg/bindings/test/containers_test.go
@@ -6,11 +6,11 @@ import (
"strings"
"time"
- "github.com/containers/libpod/v2/libpod/define"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/specgen"
- "github.com/containers/libpod/v2/test/utils"
+ "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/specgen"
+ "github.com/containers/podman/v2/test/utils"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
@@ -187,7 +187,7 @@ var _ = Describe("Podman containers ", func() {
osVer, err := strconv.Atoi(host.Version)
Expect(err).To(BeNil())
if host.Distribution == "fedora" && osVer >= 31 {
- Skip("FIXME: https://github.com/containers/libpod/issues/5325")
+ Skip("FIXME: https://github.com/containers/podman/issues/5325")
}
// Removing a paused container with force should work
diff --git a/pkg/bindings/test/create_test.go b/pkg/bindings/test/create_test.go
index 7fb69ddb7..fd9ce23ca 100644
--- a/pkg/bindings/test/create_test.go
+++ b/pkg/bindings/test/create_test.go
@@ -3,8 +3,8 @@ package test_bindings
import (
"time"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/exec_test.go b/pkg/bindings/test/exec_test.go
index e8cd32404..e3d90b9ea 100644
--- a/pkg/bindings/test/exec_test.go
+++ b/pkg/bindings/test/exec_test.go
@@ -3,9 +3,9 @@ package test_bindings
import (
"time"
- "github.com/containers/libpod/v2/pkg/api/handlers"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/api/handlers"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/images_test.go b/pkg/bindings/test/images_test.go
index c4f84f756..e0dd28d7a 100644
--- a/pkg/bindings/test/images_test.go
+++ b/pkg/bindings/test/images_test.go
@@ -6,10 +6,10 @@ import (
"path/filepath"
"time"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/bindings/images"
- "github.com/containers/libpod/v2/pkg/domain/entities"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/bindings/images"
+ "github.com/containers/podman/v2/pkg/domain/entities"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/info_test.go b/pkg/bindings/test/info_test.go
index d7a6e0e8a..6cd5d6724 100644
--- a/pkg/bindings/test/info_test.go
+++ b/pkg/bindings/test/info_test.go
@@ -4,10 +4,10 @@ import (
"runtime"
"time"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/bindings/images"
- "github.com/containers/libpod/v2/pkg/bindings/system"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/bindings/images"
+ "github.com/containers/podman/v2/pkg/bindings/system"
+ "github.com/containers/podman/v2/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/manifests_test.go b/pkg/bindings/test/manifests_test.go
index ddb549061..55fc4cb0d 100644
--- a/pkg/bindings/test/manifests_test.go
+++ b/pkg/bindings/test/manifests_test.go
@@ -4,10 +4,10 @@ import (
"net/http"
"time"
- "github.com/containers/libpod/v2/libpod/image"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/images"
- "github.com/containers/libpod/v2/pkg/bindings/manifests"
+ "github.com/containers/podman/v2/libpod/image"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/images"
+ "github.com/containers/podman/v2/pkg/bindings/manifests"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/pods_test.go b/pkg/bindings/test/pods_test.go
index 2ad6f38c1..27f648384 100644
--- a/pkg/bindings/test/pods_test.go
+++ b/pkg/bindings/test/pods_test.go
@@ -5,10 +5,10 @@ import (
"strings"
"time"
- "github.com/containers/libpod/v2/libpod/define"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/pods"
- "github.com/containers/libpod/v2/pkg/specgen"
+ "github.com/containers/podman/v2/libpod/define"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/pods"
+ "github.com/containers/podman/v2/pkg/specgen"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
diff --git a/pkg/bindings/test/system_test.go b/pkg/bindings/test/system_test.go
index 93141400b..2b2fa9b7c 100644
--- a/pkg/bindings/test/system_test.go
+++ b/pkg/bindings/test/system_test.go
@@ -1,14 +1,15 @@
package test_bindings
import (
+ "sync"
"time"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/bindings/pods"
- "github.com/containers/libpod/v2/pkg/bindings/system"
- "github.com/containers/libpod/v2/pkg/bindings/volumes"
- "github.com/containers/libpod/v2/pkg/domain/entities"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/bindings/pods"
+ "github.com/containers/podman/v2/pkg/bindings/system"
+ "github.com/containers/podman/v2/pkg/bindings/volumes"
+ "github.com/containers/podman/v2/pkg/domain/entities"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
@@ -38,22 +39,28 @@ var _ = Describe("Podman system", func() {
})
It("podman events", func() {
- eChan := make(chan entities.Event, 1)
- var messages []entities.Event
- cancelChan := make(chan bool, 1)
+ var name = "top"
+ _, err := bt.RunTopContainer(&name, bindings.PFalse, nil)
+ Expect(err).To(BeNil())
+
+ filters := make(map[string][]string)
+ filters["container"] = []string{name}
+
+ binChan := make(chan entities.Event)
+ done := sync.Mutex{}
+ done.Lock()
+ eventCounter := 0
go func() {
- for e := range eChan {
- messages = append(messages, e)
+ defer done.Unlock()
+ for range binChan {
+ eventCounter++
}
}()
- go func() {
- system.Events(bt.conn, eChan, cancelChan, nil, nil, nil, bindings.PFalse)
- }()
- _, err := bt.RunTopContainer(nil, nil, nil)
+ err = system.Events(bt.conn, binChan, nil, nil, nil, filters, bindings.PFalse)
Expect(err).To(BeNil())
- cancelChan <- true
- Expect(len(messages)).To(BeNumerically("==", 5))
+ done.Lock()
+ Expect(eventCounter).To(BeNumerically(">", 0))
})
It("podman system prune - pod,container stopped", func() {
diff --git a/pkg/bindings/test/volumes_test.go b/pkg/bindings/test/volumes_test.go
index efc02a0d4..dc90d4d00 100644
--- a/pkg/bindings/test/volumes_test.go
+++ b/pkg/bindings/test/volumes_test.go
@@ -6,10 +6,10 @@ import (
"net/http"
"time"
- "github.com/containers/libpod/v2/pkg/bindings"
- "github.com/containers/libpod/v2/pkg/bindings/containers"
- "github.com/containers/libpod/v2/pkg/bindings/volumes"
- "github.com/containers/libpod/v2/pkg/domain/entities"
+ "github.com/containers/podman/v2/pkg/bindings"
+ "github.com/containers/podman/v2/pkg/bindings/containers"
+ "github.com/containers/podman/v2/pkg/bindings/volumes"
+ "github.com/containers/podman/v2/pkg/domain/entities"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"