From c0a0471b3b2055b95dff439c6143c314bd2e3c91 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Thu, 28 Feb 2019 12:29:22 +0800 Subject: [PATCH] fix golint failures in test/e2e/instrumentation, test/e2e_node/environment --- hack/.golint_failures | 2 -- test/e2e/instrumentation/imports.go | 1 + test/e2e_node/environment/conformance.go | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hack/.golint_failures b/hack/.golint_failures index c028ddbbcc..3c8a7819b7 100644 --- a/hack/.golint_failures +++ b/hack/.golint_failures @@ -647,7 +647,6 @@ test/e2e/common test/e2e/framework test/e2e/framework/providers/gce test/e2e/framework/providers/kubemark -test/e2e/instrumentation test/e2e/instrumentation/logging test/e2e/instrumentation/monitoring test/e2e/lifecycle @@ -665,7 +664,6 @@ test/e2e/windows test/e2e_kubeadm test/e2e_node test/e2e_node/builder -test/e2e_node/environment test/e2e_node/remote test/e2e_node/runner/remote test/e2e_node/services diff --git a/test/e2e/instrumentation/imports.go b/test/e2e/instrumentation/imports.go index fed261d471..bf65b26b62 100644 --- a/test/e2e/instrumentation/imports.go +++ b/test/e2e/instrumentation/imports.go @@ -17,6 +17,7 @@ limitations under the License. package instrumentation import ( + // ensure libs have a chance to perform initialization _ "k8s.io/kubernetes/test/e2e/instrumentation/logging" _ "k8s.io/kubernetes/test/e2e/instrumentation/monitoring" ) diff --git a/test/e2e_node/environment/conformance.go b/test/e2e_node/environment/conformance.go index b029c6f424..ee750b71d0 100644 --- a/test/e2e_node/environment/conformance.go +++ b/test/e2e_node/environment/conformance.go @@ -119,12 +119,12 @@ func containerRuntime() error { return printSuccess("Container Runtime Check: %s", success) } -const kubeletClusterDnsRegexStr = `\/kubelet.*--cluster-dns=(\S+) ` +const kubeletClusterDNSRegexStr = `\/kubelet.*--cluster-dns=(\S+) ` const kubeletClusterDomainRegexStr = `\/kubelet.*--cluster-domain=(\S+)` // dns checks that cluster dns has been properly configured and can resolve the kubernetes.default service func dns() error { - dnsRegex, err := regexp.Compile(kubeletClusterDnsRegexStr) + dnsRegex, err := regexp.Compile(kubeletClusterDNSRegexStr) if err != nil { // This should never happen and can only be fixed by changing the code panic(err)