From aaa31bbb1a23c4cce6e4666821b8ca4f461b63e4 Mon Sep 17 00:00:00 2001 From: Yiqiao Pu Date: Mon, 29 Oct 2018 14:56:33 +0800 Subject: Fix no-new-privileges test Update the test to compare the output from different containers. Signed-off-by: Yiqiao Pu --- test/e2e/run_privileged_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/run_privileged_test.go b/test/e2e/run_privileged_test.go index 4bbcff204..770ea3e6b 100644 --- a/test/e2e/run_privileged_test.go +++ b/test/e2e/run_privileged_test.go @@ -104,12 +104,12 @@ var _ = Describe("Podman privileged container tests", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - privs := strings.Split(cap.OutputToString(), ":") + privs := strings.Split(session.OutputToString(), ":") session = podmanTest.Podman([]string{"run", "--security-opt", "no-new-privileges", "busybox", "grep", "NoNewPrivs", "/proc/self/status"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - noprivs := strings.Split(cap.OutputToString(), ":") + noprivs := strings.Split(session.OutputToString(), ":") Expect(privs[1]).To(Not(Equal(noprivs[1]))) }) -- cgit v1.2.3-54-g00ecf