diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-08-25 14:42:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-25 14:42:12 -0400 |
commit | 49cfed756f5dfb6d9267eb29d31f651578c9037c (patch) | |
tree | 677b6acfee4b6fddc1b08d8181ce3552a5ccab68 /test/e2e | |
parent | fefa0b32c74fc5d394a0e2bd5b4564bedb3ed15d (diff) | |
parent | 1dc6d14735eef1e51368103aefba3d7c704dcfe3 (diff) | |
download | podman-49cfed756f5dfb6d9267eb29d31f651578c9037c.tar.gz podman-49cfed756f5dfb6d9267eb29d31f651578c9037c.tar.bz2 podman-49cfed756f5dfb6d9267eb29d31f651578c9037c.zip |
Merge pull request #11103 from jwhonce/wip/bindings
Fix file descriptor leaks in bindings and add test
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/run_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index 6a2e2ed8d..846da283d 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -1331,10 +1331,10 @@ USER mail`, BB) } curCgroupsBytes, err := ioutil.ReadFile("/proc/self/cgroup") - Expect(err).To(BeNil()) - var curCgroups string = string(curCgroupsBytes) + Expect(err).ShouldNot(HaveOccurred()) + var curCgroups = string(curCgroupsBytes) fmt.Printf("Output:\n%s\n", curCgroups) - Expect(curCgroups).To(Not(Equal(""))) + Expect(curCgroups).ToNot(Equal("")) ctrName := "testctr" container := podmanTest.Podman([]string{"run", "--name", ctrName, "-d", "--cgroups=disabled", ALPINE, "top"}) @@ -1345,14 +1345,14 @@ USER mail`, BB) inspectOut := podmanTest.InspectContainer(ctrName) Expect(len(inspectOut)).To(Equal(1)) pid := inspectOut[0].State.Pid - Expect(pid).To(Not(Equal(0))) + Expect(pid).ToNot(Equal(0)) Expect(inspectOut[0].HostConfig.CgroupParent).To(Equal("")) ctrCgroupsBytes, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid)) - Expect(err).To(BeNil()) - var ctrCgroups string = string(ctrCgroupsBytes) + Expect(err).ShouldNot(HaveOccurred()) + var ctrCgroups = string(ctrCgroupsBytes) fmt.Printf("Output\n:%s\n", ctrCgroups) - Expect(curCgroups).To(Equal(ctrCgroups)) + Expect(ctrCgroups).To(Equal(curCgroups)) }) It("podman run with cgroups=enabled makes cgroups", func() { |