Lint go code (#5132)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-02-19 21:43:14 -03:00 committed by GitHub
parent f6c0faa6eb
commit 57fcbdfb73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 60 additions and 49 deletions

View file

@ -20,23 +20,22 @@ import (
"fmt"
"strings"
. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo"
"k8s.io/ingress-nginx/test/e2e/framework"
)
var _ = framework.DescribeSetting("Settings - keep alive", func() {
var _ = framework.DescribeSetting("keep-alive keep-alive-requests", func() {
f := framework.NewDefaultFramework("keep-alive")
host := "keep-alive"
BeforeEach(func() {
ginkgo.BeforeEach(func() {
f.NewEchoDeployment()
ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil)
f.EnsureIngress(ing)
})
It("should set keepalive_timeout", func() {
ginkgo.It("should set keepalive_timeout", func() {
f.UpdateNginxConfigMapData("keep-alive", "140")
f.WaitForNginxConfiguration(func(server string) bool {
@ -44,12 +43,11 @@ var _ = framework.DescribeSetting("Settings - keep alive", func() {
})
})
It("should set keepalive_requests", func() {
ginkgo.It("should set keepalive_requests", func() {
f.UpdateNginxConfigMapData("keep-alive-requests", "200")
f.WaitForNginxConfiguration(func(server string) bool {
return strings.Contains(server, fmt.Sprintf(`keepalive_requests 200;`))
})
})
})