aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/events_test.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-06-04 13:15:33 +0200
committerMatthew Heon <mheon@redhat.com>2021-06-11 13:06:07 -0400
commitc751544facb3fb891f40d4d125940a51c0477494 (patch)
tree1c55d9186e501c696c484e0767d62d0712eaf33a /test/e2e/events_test.go
parentc28f442b28cf858feb0e7d9d6ee77df708030cd5 (diff)
downloadpodman-c751544facb3fb891f40d4d125940a51c0477494.tar.gz
podman-c751544facb3fb891f40d4d125940a51c0477494.tar.bz2
podman-c751544facb3fb891f40d4d125940a51c0477494.zip
remote events: support labels
Certain event meta data was lost when converting the remote events to libpod events and vice versa. Enable the skipped system tests for remote. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/e2e/events_test.go')
-rw-r--r--test/e2e/events_test.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go
index 4dbbe9dd8..cc7c4d996 100644
--- a/test/e2e/events_test.go
+++ b/test/e2e/events_test.go
@@ -8,6 +8,7 @@ import (
"sync"
"time"
+ "github.com/containers/podman/v3/libpod/events"
. "github.com/containers/podman/v3/test/utils"
"github.com/containers/storage/pkg/stringid"
. "github.com/onsi/ginkgo"
@@ -134,12 +135,10 @@ var _ = Describe("Podman events", func() {
jsonArr := test.OutputToStringArray()
Expect(test.OutputToStringArray()).ShouldNot(BeEmpty())
- eventsMap := make(map[string]string)
- err := json.Unmarshal([]byte(jsonArr[0]), &eventsMap)
+ event := events.Event{}
+ err := json.Unmarshal([]byte(jsonArr[0]), &event)
Expect(err).ToNot(HaveOccurred())
- Expect(eventsMap).To(HaveKey("Status"))
-
test = podmanTest.Podman([]string{"events", "--stream=false", "--format", "{{json.}}"})
test.WaitWithDefaultTimeout()
Expect(test).To(Exit(0))
@@ -147,11 +146,9 @@ var _ = Describe("Podman events", func() {
jsonArr = test.OutputToStringArray()
Expect(test.OutputToStringArray()).ShouldNot(BeEmpty())
- eventsMap = make(map[string]string)
- err = json.Unmarshal([]byte(jsonArr[0]), &eventsMap)
+ event = events.Event{}
+ err = json.Unmarshal([]byte(jsonArr[0]), &event)
Expect(err).ToNot(HaveOccurred())
-
- Expect(eventsMap).To(HaveKey("Status"))
})
It("podman events --until future", func() {