Fix golangci-lint errors (#10196)
* Fix golangci-lint errors Signed-off-by: z1cheng <imchench@gmail.com> * Fix dupl errors Signed-off-by: z1cheng <imchench@gmail.com> * Fix comments Signed-off-by: z1cheng <imchench@gmail.com> * Fix errcheck lint errors Signed-off-by: z1cheng <imchench@gmail.com> * Fix assert in e2e test Signed-off-by: z1cheng <imchench@gmail.com> * Not interrupt the waitForPodsReady Signed-off-by: z1cheng <imchench@gmail.com> * Replace string with constant Signed-off-by: z1cheng <imchench@gmail.com> * Fix comments Signed-off-by: z1cheng <imchench@gmail.com> * Revert write file permision Signed-off-by: z1cheng <imchench@gmail.com> --------- Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
parent
46d87d3462
commit
b3060bfbd0
253 changed files with 2434 additions and 2113 deletions
|
|
@ -26,6 +26,8 @@ import (
|
|||
"k8s.io/ingress-nginx/test/e2e/framework"
|
||||
)
|
||||
|
||||
const fooHost = "foo"
|
||||
|
||||
var _ = framework.DescribeAnnotation("server-alias", func() {
|
||||
f := framework.NewDefaultFramework("alias")
|
||||
|
||||
|
|
@ -34,7 +36,7 @@ var _ = framework.DescribeAnnotation("server-alias", func() {
|
|||
})
|
||||
|
||||
ginkgo.It("should return status code 200 for host 'foo' and 404 for 'bar'", func() {
|
||||
host := "foo"
|
||||
host := fooHost
|
||||
|
||||
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil)
|
||||
f.EnsureIngress(ing)
|
||||
|
|
@ -60,7 +62,7 @@ var _ = framework.DescribeAnnotation("server-alias", func() {
|
|||
})
|
||||
|
||||
ginkgo.It("should return status code 200 for host 'foo' and 'bar'", func() {
|
||||
host := "foo"
|
||||
host := fooHost
|
||||
annotations := map[string]string{
|
||||
"nginx.ingress.kubernetes.io/server-alias": "bar",
|
||||
}
|
||||
|
|
@ -73,7 +75,7 @@ var _ = framework.DescribeAnnotation("server-alias", func() {
|
|||
return strings.Contains(server, fmt.Sprintf("server_name %v", host))
|
||||
})
|
||||
|
||||
hosts := []string{"foo", "bar"}
|
||||
hosts := []string{fooHost, "bar"}
|
||||
for _, host := range hosts {
|
||||
f.HTTPTestClient().
|
||||
GET("/").
|
||||
|
|
@ -85,7 +87,7 @@ var _ = framework.DescribeAnnotation("server-alias", func() {
|
|||
})
|
||||
|
||||
ginkgo.It("should return status code 200 for hosts defined in two ingresses, different path with one alias", func() {
|
||||
host := "foo"
|
||||
host := fooHost
|
||||
|
||||
ing := framework.NewSingleIngress("app-a", "/app-a", host, f.Namespace, framework.EchoService, 80, nil)
|
||||
f.EnsureIngress(ing)
|
||||
|
|
@ -101,7 +103,7 @@ var _ = framework.DescribeAnnotation("server-alias", func() {
|
|||
return strings.Contains(server, fmt.Sprintf("server_name %v bar", host))
|
||||
})
|
||||
|
||||
hosts := []string{"foo", "bar"}
|
||||
hosts := []string{fooHost, "bar"}
|
||||
for _, host := range hosts {
|
||||
f.HTTPTestClient().
|
||||
GET("/app-a").
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue