mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-27 05:04:52 +00:00
Don't trim whitespace from kubectl output in e2e tests
This commit is contained in:
@@ -220,7 +220,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
|
||||
It("should support exec", func() {
|
||||
By("executing a command in the container")
|
||||
execOutput := framework.RunKubectlOrDie("exec", fmt.Sprintf("--namespace=%v", ns), simplePodName, "echo", "running", "in", "container")
|
||||
if e, a := "running in container", execOutput; e != a {
|
||||
if e, a := "running in container", strings.TrimSpace(execOutput); e != a {
|
||||
framework.Failf("Unexpected kubectl exec output. Wanted %q, got %q", e, a)
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ var _ = framework.KubeDescribe("Kubectl client", func() {
|
||||
execOutput = framework.NewKubectlCommand("exec", fmt.Sprintf("--namespace=%v", ns), "-i", simplePodName, "bash").
|
||||
WithStdinReader(r).
|
||||
ExecOrDie()
|
||||
if e, a := "hi", execOutput; e != a {
|
||||
if e, a := "hi", strings.TrimSpace(execOutput); e != a {
|
||||
framework.Failf("Unexpected kubectl exec output. Wanted %q, got %q", e, a)
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user