summaryrefslogtreecommitdiff
path: root/pkg/bindings/test/pods_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-23 11:12:34 -0700
committerEd Santiago <santiago@redhat.com>2021-11-29 08:30:00 -0700
commitb63d696405593d056cce850e1503a6bef17c2cf8 (patch)
tree77aa079636ea326eec76520734e0ae9e815ca6c2 /pkg/bindings/test/pods_test.go
parent3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4 (diff)
downloadpodman-b63d696405593d056cce850e1503a6bef17c2cf8.tar.gz
podman-b63d696405593d056cce850e1503a6bef17c2cf8.tar.bz2
podman-b63d696405593d056cce850e1503a6bef17c2cf8.zip
e2e tests: enable golint
...and fix problems found therewith. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'pkg/bindings/test/pods_test.go')
-rw-r--r--pkg/bindings/test/pods_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/bindings/test/pods_test.go b/pkg/bindings/test/pods_test.go
index 879d4d00d..0a4261ea2 100644
--- a/pkg/bindings/test/pods_test.go
+++ b/pkg/bindings/test/pods_test.go
@@ -1,4 +1,4 @@
-package test_bindings
+package bindings_test
import (
"fmt"
@@ -79,6 +79,7 @@ var _ = Describe("Podman pods", func() {
var newpod2 string = "newpod2"
bt.Podcreate(&newpod2)
podSummary, err = pods.List(bt.conn, nil)
+ Expect(err).To(BeNil(), "Error from pods.List")
Expect(len(podSummary)).To(Equal(2))
var names []string
for _, i := range podSummary {
@@ -106,6 +107,7 @@ var _ = Describe("Podman pods", func() {
options := new(pods.ListOptions).WithFilters(filters)
filteredPods, err := pods.List(bt.conn, options)
Expect(err).ToNot(BeNil())
+ Expect(len(filteredPods)).To(Equal(0), "len(filteredPods)")
code, _ := bindings.CheckResponseCode(err)
Expect(code).To(BeNumerically("==", http.StatusInternalServerError))
@@ -301,6 +303,7 @@ var _ = Describe("Podman pods", func() {
// No pods pruned since no pod in exited state
pruneResponse, err := pods.Prune(bt.conn, nil)
Expect(err).To(BeNil())
+ Expect(len(pruneResponse)).To(Equal(0), "len(pruneResponse)")
podSummary, err := pods.List(bt.conn, nil)
Expect(err).To(BeNil())
Expect(len(podSummary)).To(Equal(2))
@@ -317,6 +320,7 @@ var _ = Describe("Podman pods", func() {
Expect(response.State).To(Equal(define.PodStateExited))
pruneResponse, err = pods.Prune(bt.conn, nil)
Expect(err).To(BeNil())
+ Expect(len(pruneResponse)).To(Equal(1), "len(pruneResponse)")
// Validate status and record pod id of pod to be pruned
Expect(response.State).To(Equal(define.PodStateExited))
podID := response.ID