From 3bac60a8ed8410dce61a84d145dab2eacee80dc0 Mon Sep 17 00:00:00 2001 From: bl-ue <54780737+bl-ue@users.noreply.github.com> Date: Fri, 27 Nov 2020 14:55:23 -0500 Subject: [PATCH] Fix typo in kubectl/.../attach_test.go exepctedErr -> expectedErr Kubernetes-commit: b34d00aa09084d5786d4ca5cf11b173be9f791eb --- pkg/cmd/attach/attach_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/cmd/attach/attach_test.go b/pkg/cmd/attach/attach_test.go index 7edbd690..eaeeae02 100644 --- a/pkg/cmd/attach/attach_test.go +++ b/pkg/cmd/attach/attach_test.go @@ -200,7 +200,7 @@ func TestAttach(t *testing.T) { name, version, podPath, fetchPodPath, attachPath, container string pod *corev1.Pod remoteAttachErr bool - exepctedErr string + expectedErr string }{ { name: "pod attach", @@ -220,7 +220,7 @@ func TestAttach(t *testing.T) { pod: attachPod(), remoteAttachErr: true, container: "bar", - exepctedErr: "attach error", + expectedErr: "attach error", }, { name: "container not found error", @@ -230,7 +230,7 @@ func TestAttach(t *testing.T) { attachPath: "/api/" + version + "/namespaces/test/pods/foo/attach", pod: attachPod(), container: "foo", - exepctedErr: "cannot attach to the container: container not found (foo)", + expectedErr: "cannot attach to the container: container not found (foo)", }, } for _, test := range tests { @@ -290,15 +290,15 @@ func TestAttach(t *testing.T) { } err := options.Run() - if test.exepctedErr != "" && err.Error() != test.exepctedErr { + if test.expectedErr != "" && err.Error() != test.expectedErr { t.Errorf("%s: Unexpected exec error: %v", test.name, err) return } - if test.exepctedErr == "" && err != nil { + if test.expectedErr == "" && err != nil { t.Errorf("%s: Unexpected error: %v", test.name, err) return } - if test.exepctedErr != "" { + if test.expectedErr != "" { return } if remoteAttach.url.Path != test.attachPath {