fix some golint failures of e2e/network/[d-k]*.go

This commit is contained in:
SataQiu
2019-04-08 18:27:08 +08:00
parent f873d2a056
commit 36bc97cbb8
6 changed files with 39 additions and 41 deletions

View File

@@ -39,7 +39,7 @@ const (
dnsReadyTimeout = time.Minute
)
const queryDnsPythonTemplate string = `
const queryDNSPythonTemplate string = `
import socket
try:
socket.gethostbyname('%s')
@@ -131,8 +131,8 @@ var _ = SIGDescribe("ClusterDns [Feature:Example]", func() {
}
podName := pods.Items[0].Name
queryDns := fmt.Sprintf(queryDnsPythonTemplate, backendSvcName+"."+namespaces[0].Name)
_, err = framework.LookForStringInPodExec(namespaces[0].Name, podName, []string{"python", "-c", queryDns}, "ok", dnsReadyTimeout)
queryDNS := fmt.Sprintf(queryDNSPythonTemplate, backendSvcName+"."+namespaces[0].Name)
_, err = framework.LookForStringInPodExec(namespaces[0].Name, podName, []string{"python", "-c", queryDNS}, "ok", dnsReadyTimeout)
Expect(err).NotTo(HaveOccurred(), "waiting for output from pod exec")
updatedPodYaml := prepareResourceWithReplacedString(frontendPodYaml, fmt.Sprintf("dns-backend.development.svc.%s", framework.TestContext.ClusterDNSDomain), fmt.Sprintf("dns-backend.%s.svc.%s", namespaces[0].Name, framework.TestContext.ClusterDNSDomain))