diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-14 13:07:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-14 13:07:11 -0400 |
commit | e3eb6fd0e4115162e10caf6ae2196fd8774657e0 (patch) | |
tree | 9c75804b98eefa34a2cc924c8ccb2b8fc9c40d01 /test | |
parent | d30b4b7aa5076c3192faada7d408f039a40414eb (diff) | |
parent | eb4a746efcb9e76e29942461b97da797fd67109f (diff) | |
download | podman-e3eb6fd0e4115162e10caf6ae2196fd8774657e0.tar.gz podman-e3eb6fd0e4115162e10caf6ae2196fd8774657e0.tar.bz2 podman-e3eb6fd0e4115162e10caf6ae2196fd8774657e0.zip |
Merge pull request #7987 from jwhonce/jira/run-898-5
Restore --format table support
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/build_test.go | 1 | ||||
-rw-r--r-- | test/e2e/events_test.go | 26 |
2 files changed, 16 insertions, 11 deletions
diff --git a/test/e2e/build_test.go b/test/e2e/build_test.go index 5155bcbc7..572e55fe5 100644 --- a/test/e2e/build_test.go +++ b/test/e2e/build_test.go @@ -220,7 +220,6 @@ var _ = Describe("Podman build", func() { }) It("podman build --http_proxy flag", func() { - SkipIfRemote("FIXME: This is broken should be fixed") // This is hanging currently. os.Setenv("http_proxy", "1.2.3.4") if IsRemote() { podmanTest.StopRemoteService() diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go index bea8caa93..b37bd584e 100644 --- a/test/e2e/events_test.go +++ b/test/e2e/events_test.go @@ -10,6 +10,7 @@ import ( . "github.com/containers/podman/v2/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gexec" ) var _ = Describe("Podman events", func() { @@ -126,26 +127,31 @@ var _ = Describe("Podman events", func() { SkipIfNotFedora() _, ec, _ := podmanTest.RunLsContainer("") Expect(ec).To(Equal(0)) + test := podmanTest.Podman([]string{"events", "--stream=false", "--format", "json"}) test.WaitWithDefaultTimeout() - Expect(test.ExitCode()).To(BeZero()) + Expect(test).To(Exit(0)) + jsonArr := test.OutputToStringArray() - Expect(len(jsonArr)).To(Not(BeZero())) + Expect(test.OutputToStringArray()).ShouldNot(BeEmpty()) + eventsMap := make(map[string]string) err := json.Unmarshal([]byte(jsonArr[0]), &eventsMap) - Expect(err).To(BeNil()) - _, exist := eventsMap["Status"] - Expect(exist).To(BeTrue()) + Expect(err).ToNot(HaveOccurred()) + + Expect(eventsMap).To(HaveKey("Status")) test = podmanTest.Podman([]string{"events", "--stream=false", "--format", "{{json.}}"}) test.WaitWithDefaultTimeout() - Expect(test.ExitCode()).To(BeZero()) + Expect(test).To(Exit(0)) + jsonArr = test.OutputToStringArray() - Expect(len(jsonArr)).To(Not(BeZero())) + Expect(test.OutputToStringArray()).ShouldNot(BeEmpty()) + eventsMap = make(map[string]string) err = json.Unmarshal([]byte(jsonArr[0]), &eventsMap) - Expect(err).To(BeNil()) - _, exist = eventsMap["Status"] - Expect(exist).To(BeTrue()) + Expect(err).ToNot(HaveOccurred()) + + Expect(eventsMap).To(HaveKey("Status")) }) }) |