diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-14 12:33:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 12:33:11 -0700 |
commit | 32268eaa6239057b82445172bf8128dabec0fe14 (patch) | |
tree | 3011e41d01635cc83ad7cd38c5cb1cbc60b2af48 /test/e2e | |
parent | 77dbfc753097d4b3a07c1382cb388e79515ffdb0 (diff) | |
parent | 28ffe74e4441d96cb36abb58344824bfc4701c47 (diff) | |
download | podman-32268eaa6239057b82445172bf8128dabec0fe14.tar.gz podman-32268eaa6239057b82445172bf8128dabec0fe14.tar.bz2 podman-32268eaa6239057b82445172bf8128dabec0fe14.zip |
Merge pull request #6235 from QiWang19/events-format
fix bug --format {{json.}} of events
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/events_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go index 0636af74c..289f23b54 100644 --- a/test/e2e/events_test.go +++ b/test/e2e/events_test.go @@ -137,5 +137,19 @@ var _ = Describe("Podman events", func() { _, exist := eventsMap["Status"] Expect(exist).To(BeTrue()) Expect(test.ExitCode()).To(BeZero()) + + test = podmanTest.Podman([]string{"events", "--stream=false", "--format", "{{json.}}"}) + test.WaitWithDefaultTimeout() + fmt.Println(test.OutputToStringArray()) + jsonArr = test.OutputToStringArray() + Expect(len(jsonArr)).To(Not(BeZero())) + eventsMap = make(map[string]string) + err = json.Unmarshal([]byte(jsonArr[0]), &eventsMap) + if err != nil { + os.Exit(1) + } + _, exist = eventsMap["Status"] + Expect(exist).To(BeTrue()) + Expect(test.ExitCode()).To(BeZero()) }) }) |