From 05bff300f3ed8a0bc51998ace11dad50782c84c5 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Thu, 26 Jan 2017 17:09:13 +0000 Subject: [PATCH] test/e2e_node: tie together expected string and exec This commit ties together busybox-sh invocation and test expectation to avoid subtle mismatches between exec command and output string. --- test/e2e_node/kubelet_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e_node/kubelet_test.go b/test/e2e_node/kubelet_test.go index 714628250ca..66a79016dfa 100644 --- a/test/e2e_node/kubelet_test.go +++ b/test/e2e_node/kubelet_test.go @@ -131,7 +131,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { { Image: "gcr.io/google_containers/busybox:1.24", Name: podName, - Command: []string{"sh", "-c", "echo test > /file; sleep 240"}, + Command: []string{"/bin/sh", "-c", "echo test > /file; sleep 240"}, SecurityContext: &v1.SecurityContext{ ReadOnlyRootFilesystem: &isReadOnly, }, @@ -148,7 +148,7 @@ var _ = framework.KubeDescribe("Kubelet", func() { buf := new(bytes.Buffer) buf.ReadFrom(rc) return buf.String() - }, time.Minute, time.Second*4).Should(Equal("sh: can't create /file: Read-only file system\n")) + }, time.Minute, time.Second*4).Should(Equal("/bin/sh: can't create /file: Read-only file system\n")) }) }) })