From 4465068462dc90857746ef84614012e0a336d89e Mon Sep 17 00:00:00 2001 From: Zach Loafman Date: Tue, 27 Dec 2016 23:37:48 -0800 Subject: [PATCH] Remove system:anonymous check from kubectl test This verbiage doesn't appear when the cluster is AlwaysAllow --- test/e2e/kubectl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 0a6bccea62a..a2285a0d4d0 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -583,11 +583,11 @@ var _ = framework.KubeDescribe("Kubectl client", func() { _, err := framework.RunHostCmd(ns, simplePodName, "/kubectl get pods --token=invalid --v=7 2>&1") framework.Logf("got err %v", err) Expect(err).To(HaveOccurred()) - Expect(err).To(ContainSubstring("User \"system:anonymous\" cannot list pods in the namespace")) Expect(err).To(ContainSubstring("Using in-cluster namespace")) Expect(err).To(ContainSubstring("Using in-cluster configuration")) Expect(err).To(ContainSubstring("Authorization: Bearer invalid")) - Expect(err).To(ContainSubstring("Response Status: 403 Forbidden")) + // TODO(kubernetes/kubernetes#39267): We should only see a 401 from an invalid bearer token. + Expect(err).To(Or(ContainSubstring("Response Status: 403 Forbidden"), ContainSubstring("Response Status: 401 Unauthorized"))) By("trying to use kubectl with invalid server") _, err = framework.RunHostCmd(ns, simplePodName, "/kubectl get pods --server=invalid --v=6 2>&1")