Lint code using staticcheck (#4471)
This commit is contained in:
parent
8f09acac2b
commit
fcd3054f13
16 changed files with 32 additions and 41 deletions
|
|
@ -49,7 +49,7 @@ var _ = framework.IngressNginxDescribe("Configmap change", func() {
|
|||
|
||||
f.UpdateNginxConfigMapData(wlKey, wlValue)
|
||||
|
||||
checksumRegex := regexp.MustCompile("Configuration checksum:\\s+(\\d+)")
|
||||
checksumRegex := regexp.MustCompile(`Configuration checksum:\s+(\d+)`)
|
||||
checksum := ""
|
||||
|
||||
f.WaitForNginxConfiguration(
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ var _ = framework.IngressNginxDescribe("Global External Auth", func() {
|
|||
err := f.DeleteDeployment("httpbin")
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
resp, _, errs = gorequest.New().
|
||||
_, _, errs = gorequest.New().
|
||||
Get(f.GetURL(framework.HTTP)).
|
||||
Retry(10, 1*time.Second, http.StatusNotFound).
|
||||
Set("Host", host).
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ var _ = framework.IngressNginxDescribe("Ingress class", func() {
|
|||
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
|
||||
|
||||
delete(ing.Annotations, "kubernetes.io/ingress.class")
|
||||
ing = f.EnsureIngress(ing)
|
||||
f.EnsureIngress(ing)
|
||||
|
||||
f.WaitForNginxConfiguration(func(cfg string) bool {
|
||||
return !strings.Contains(cfg, "server_name foo")
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ var _ = framework.IngressNginxDescribe("Settings - TLS)", func() {
|
|||
framework.WaitForTLS(f.GetURL(framework.HTTPS), tlsConfig)
|
||||
|
||||
resp, _, errs := gorequest.New().
|
||||
Get(fmt.Sprintf(f.GetURL(framework.HTTP))).
|
||||
Get(f.GetURL(framework.HTTP)).
|
||||
Retry(10, 1*time.Second, http.StatusNotFound).
|
||||
RedirectPolicy(noRedirectPolicyFunc).
|
||||
Set("Host", host).
|
||||
|
|
@ -206,7 +206,7 @@ var _ = framework.IngressNginxDescribe("Settings - TLS)", func() {
|
|||
framework.WaitForTLS(f.GetURL(framework.HTTPS), tlsConfig)
|
||||
|
||||
resp, _, errs := gorequest.New().
|
||||
Get(fmt.Sprintf(f.GetURL(framework.HTTP))).
|
||||
Get(f.GetURL(framework.HTTP)).
|
||||
Retry(10, 1*time.Second, http.StatusNotFound).
|
||||
RedirectPolicy(noRedirectPolicyFunc).
|
||||
Set("Host", host).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue