Remove empty BeforeEach and AfterEach from e2e tests

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-02-12 20:08:38 -03:00
parent b37270bdde
commit 0197ea0dc4
52 changed files with 0 additions and 178 deletions

View file

@ -40,9 +40,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity/Sticky Sessions",
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set sticky cookie SERVERID", func() {
host := "sticky.foo.com"
annotations := map[string]string{

View file

@ -34,9 +34,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Alias", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should return status code 200 for host 'foo' and 404 for 'bar'", func() {
host := "foo"
annotations := map[string]string{}

View file

@ -33,9 +33,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Approot", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should redirect to /foo", func() {
host := "approot.bar.com"

View file

@ -35,9 +35,6 @@ var _ = framework.IngressNginxDescribe("Annotations - AuthTLS", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set valid auth-tls-secret", func() {
host := "authtls.foo.com"
nameSpace := f.Namespace

View file

@ -29,9 +29,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Backendprotocol", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set backend protocol to https:// and use proxy_pass", func() {
host := "backendprotocol.foo.com"
annotations := map[string]string{

View file

@ -29,9 +29,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Client-Body-Buffer-Size",
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set client_body_buffer_size to 1000", func() {
host := "proxy.foo.com"
annotations := map[string]string{

View file

@ -34,9 +34,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Connection", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("set connection header to keep-alive", func() {
host := "connection.foo.com"
annotations := map[string]string{

View file

@ -33,9 +33,6 @@ var _ = framework.IngressNginxDescribe("Annotations - CORS", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should enable cors", func() {
host := "cors.foo.com"
annotations := map[string]string{

View file

@ -38,9 +38,6 @@ var _ = framework.IngressNginxDescribe("Annotations - custom-http-errors", func(
f.NewEchoDeploymentWithReplicas(1)
})
AfterEach(func() {
})
It("configures Nginx correctly", func() {
host := "customerrors.foo.com"

View file

@ -33,9 +33,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Forcesslredirect", func()
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should redirect to https", func() {
host := "forcesslredirect.bar.com"

View file

@ -36,9 +36,6 @@ var _ = framework.IngressNginxDescribe("Annotations - from-to-www-redirect", fun
f.NewEchoDeploymentWithReplicas(1)
})
AfterEach(func() {
})
It("should redirect from www HTTP to HTTP", func() {
By("setting up server for redirect from www")
host := "fromtowwwredirect.bar.com"

View file

@ -29,9 +29,6 @@ var _ = framework.IngressNginxDescribe("Annotations - HTTP2 Push Preload", func(
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("enable the http2-push-preload directive", func() {
host := "http2pp.foo.com"
annotations := map[string]string{

View file

@ -31,9 +31,6 @@ var _ = framework.IngressNginxDescribe("Annotations - IPWhiteList", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set valid ip whitelist range", func() {
host := "ipwhitelist.foo.com"
nameSpace := f.Namespace

View file

@ -30,9 +30,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Log", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("set access_log off", func() {
host := "log.foo.com"
annotations := map[string]string{

View file

@ -33,9 +33,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Mirror", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should set mirror-target to http://localhost/mirror", func() {
annotations := map[string]string{
"nginx.ingress.kubernetes.io/mirror-target": "http://localhost/mirror",

View file

@ -30,9 +30,6 @@ var _ = framework.IngressNginxDescribe("Annotations - ModSecurityLocation", func
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should enable modsecurity", func() {
host := "modsecurity.foo.com"
nameSpace := f.Namespace

View file

@ -33,9 +33,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Proxy", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set proxy_redirect to off", func() {
annotations := map[string]string{
"nginx.ingress.kubernetes.io/proxy-redirect-from": "off",

View file

@ -32,9 +32,6 @@ var _ = framework.IngressNginxDescribe("Annotations - ProxySSL", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should set valid proxy-ssl-secret", func() {
host := "proxyssl.foo.com"
annotations := map[string]string{

View file

@ -37,12 +37,6 @@ func noRedirectPolicyFunc(gorequest.Request, []gorequest.Request) error {
var _ = framework.IngressNginxDescribe("Annotations - Redirect", func() {
f := framework.NewDefaultFramework("redirect")
BeforeEach(func() {
})
AfterEach(func() {
})
It("should respond with a standard redirect code", func() {
By("setting permanent-redirect annotation")

View file

@ -36,9 +36,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Rewrite", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should write rewrite logs", func() {
By("setting enable-rewrite-log annotation")

View file

@ -37,9 +37,6 @@ var _ = framework.IngressNginxDescribe("Annotations - SATISFY", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should configure satisfy directive correctly", func() {
host := "satisfy"
annotationKey := "nginx.ingress.kubernetes.io/satisfy"

View file

@ -31,9 +31,6 @@ var _ = framework.IngressNginxDescribe("Annotations - ServerSnippet", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It(`add valid directives to server via server snippet"`, func() {
host := "serversnippet.foo.com"
annotations := map[string]string{

View file

@ -29,9 +29,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Configurationsnippet", fun
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It(`set snippet "more_set_headers "Request-Id: $req_id";" in all locations"`, func() {
host := "configurationsnippet.foo.com"
annotations := map[string]string{

View file

@ -30,9 +30,6 @@ var _ = framework.IngressNginxDescribe("Annotations - SSL CIPHERS", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("should change ssl ciphers", func() {
host := "ciphers.foo.com"
annotations := map[string]string{

View file

@ -79,9 +79,6 @@ var _ = framework.IngressNginxDescribe("Annotations - UpstreamHashBy", func() {
f.NewEchoDeploymentWithReplicas(6)
})
AfterEach(func() {
})
It("should connect to the same pod", func() {
annotations := map[string]string{
"nginx.ingress.kubernetes.io/upstream-hash-by": "$request_uri",
@ -101,6 +98,5 @@ var _ = framework.IngressNginxDescribe("Annotations - UpstreamHashBy", func() {
podMap := startIngress(f, annotations)
Expect(len(podMap)).Should(Equal(3))
})
})

View file

@ -29,9 +29,6 @@ var _ = framework.IngressNginxDescribe("Annotations - Upstreamvhost", func() {
f.NewEchoDeploymentWithReplicas(2)
})
AfterEach(func() {
})
It("set host to upstreamvhost.bar.com", func() {
host := "upstreamvhost.foo.com"
annotations := map[string]string{

View file

@ -32,9 +32,6 @@ var _ = framework.IngressNginxDescribe("Annotations - X-Forwarded-Prefix", func(
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should set the X-Forwarded-Prefix to the annotation value", func() {
host := "xfp.baz.com"
annotations := map[string]string{

View file

@ -34,9 +34,6 @@ var _ = framework.IngressNginxDescribe("Debug Tool", func() {
f.NewEchoDeploymentWithReplicas(1)
})
AfterEach(func() {
})
It("should list the backend servers", func() {
annotations := map[string]string{}

View file

@ -30,12 +30,6 @@ import (
var _ = framework.IngressNginxDescribe("Default backend", func() {
f := framework.NewDefaultFramework("default-backend")
BeforeEach(func() {
})
AfterEach(func() {
})
It("should return 404 sending requests when only a default backend is running", func() {
testCases := []struct {
Name string

View file

@ -29,12 +29,6 @@ import (
var _ = framework.IngressNginxDescribe("Default backend - SSL", func() {
f := framework.NewDefaultFramework("default-backend")
BeforeEach(func() {
})
AfterEach(func() {
})
It("should return a self generated SSL certificate", func() {
By("checking SSL Certificate using the NGINX IP address")
resp, _, errs := gorequest.New().

View file

@ -38,9 +38,6 @@ var _ = framework.IngressNginxDescribe("Default backend with hosts", func() {
f.NewEchoDeploymentWithReplicas(1)
})
AfterEach(func() {
})
It("should apply the annotation to the default backend", func() {
annotations := map[string]string{
"nginx.ingress.kubernetes.io/proxy-buffer-size": "8k",

View file

@ -39,9 +39,6 @@ var _ = framework.IngressNginxDescribe("Shutdown ingress controller", func() {
f.NewSlowEchoDeployment()
})
AfterEach(func() {
})
It("should shutdown in less than 60 secons without pending connections", func() {
f.EnsureIngress(framework.NewSingleIngress(host, "/", host, f.Namespace, framework.SlowEchoService, 80, nil))

View file

@ -40,9 +40,6 @@ var _ = framework.IngressNginxDescribe("DynamicCertificates", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
framework.MemoryLeakIt("should not leak memory from ingress SSL certificates or configuration updates", func() {
hostCount := 1000
iterations := 10

View file

@ -32,9 +32,6 @@ var _ = framework.IngressNginxDescribe("Load Balance - Configmap value", func()
f.NewEchoDeploymentWithReplicas(1)
})
AfterEach(func() {
})
It("should apply the configmap load-balance setting", func() {
host := "load-balance.com"

View file

@ -36,9 +36,6 @@ var _ = framework.IngressNginxDescribe("Request smuggling", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should not return body content from error_page", func() {
host := "foo.bar.com"

View file

@ -35,12 +35,6 @@ import (
var _ = framework.IngressNginxDescribe("Service backend - 503", func() {
f := framework.NewDefaultFramework("service-backend")
BeforeEach(func() {
})
AfterEach(func() {
})
It("should return 503 when backend service does not exist", func() {
host := "nonexistent.svc.com"

View file

@ -35,12 +35,6 @@ import (
var _ = framework.IngressNginxDescribe("Service Type ExternalName", func() {
f := framework.NewDefaultFramework("type-externalname")
BeforeEach(func() {
})
AfterEach(func() {
})
It("works with external name set to incomplete fdqn", func() {
f.NewEchoDeployment()

View file

@ -33,9 +33,6 @@ var _ = framework.IngressNginxDescribe("Configmap change", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should reload after an update in the configuration", func() {
host := "configmap-change"

View file

@ -49,9 +49,6 @@ var _ = framework.IngressNginxDescribe("Disabled catch-all", func() {
Expect(err).NotTo(HaveOccurred(), "unexpected error updating ingress controller deployment flags")
})
AfterEach(func() {
})
It("should ignore catch all Ingress", func() {
host := "foo"

View file

@ -38,9 +38,6 @@ var _ = framework.IngressNginxDescribe("X-Forwarded headers", func() {
f.UpdateNginxConfigMapData(setting, "false")
})
AfterEach(func() {
})
It("should trust X-Forwarded headers when setting is true", func() {
host := "forwarded-headers"

View file

@ -37,9 +37,6 @@ var _ = framework.IngressNginxDescribe("Global access block", func() {
f.EnsureIngress(framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil))
})
AfterEach(func() {
})
It("should block CIDRs defined in the ConfigMap", func() {
f.UpdateNginxConfigMapData("block-cidrs", "172.16.0.0/12,192.168.0.0/16,10.0.0.0/8")

View file

@ -50,9 +50,6 @@ var _ = framework.IngressNginxDescribe("Global External Auth", func() {
f.NewHttpbinDeployment()
})
AfterEach(func() {
})
Context("when global external authentication is configured", func() {
BeforeEach(func() {

View file

@ -37,9 +37,6 @@ var _ = framework.IngressNginxDescribe("Ingress class", func() {
f.NewEchoDeploymentWithReplicas(1)
})
AfterEach(func() {
})
Context("Without a specific ingress-class", func() {
It("should ignore Ingress with class", func() {

View file

@ -31,9 +31,6 @@ var _ = framework.IngressNginxDescribe("LuaSharedDict", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("configures lua shared dicts", func() {
ingress := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.EchoService, 80, nil)
f.EnsureIngress(ingress)

View file

@ -53,9 +53,6 @@ var _ = framework.IngressNginxDescribe("No Auth locations", func() {
f.EnsureIngress(bi)
})
AfterEach(func() {
})
It("should return status code 401 when accessing '/' unauthentication", func() {
f.WaitForNginxServer(host,
func(server string) bool {

View file

@ -38,9 +38,6 @@ var _ = framework.IngressNginxDescribe("Proxy Protocol", func() {
f.UpdateNginxConfigMapData(setting, "false")
})
AfterEach(func() {
})
It("should respect port passed by the PROXY Protocol", func() {
host := "proxy-protocol"

View file

@ -35,9 +35,6 @@ var _ = framework.IngressNginxDescribe("Server Tokens", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should not exists Server header in the response", func() {
f.UpdateNginxConfigMapData(serverTokens, "false")

View file

@ -43,9 +43,6 @@ var _ = framework.IngressNginxDescribe("Settings - TLS)", func() {
f.UpdateNginxConfigMapData("use-forwarded-headers", "false")
})
AfterEach(func() {
})
It("should configure TLS protocol", func() {
sslCiphers := "ssl-ciphers"
sslProtocols := "ssl-protocols"

View file

@ -34,9 +34,6 @@ var _ = framework.IngressNginxDescribe("sslredirect", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should redirect from HTTP to HTTPS when secret is missing", func() {
host := "redirect.com"

View file

@ -39,9 +39,6 @@ var _ = framework.IngressNginxDescribe("SSL", func() {
f.NewEchoDeployment()
})
AfterEach(func() {
})
It("should not appear references to secret updates not used in ingress rules", func() {
host := "ssl-update"

View file

@ -39,12 +39,6 @@ var _ = framework.IngressNginxDescribe("Status Update [Status]", func() {
host := "status-update"
address := getHostIP()
BeforeEach(func() {
})
AfterEach(func() {
})
It("should update status field after client-go reconnection", func() {
port, cmd, err := f.KubectlProxy(0)
Expect(err).NotTo(HaveOccurred(), "unexpected error starting kubectl proxy")

View file

@ -37,12 +37,6 @@ import (
var _ = framework.IngressNginxDescribe("TCP Feature", func() {
f := framework.NewDefaultFramework("tcp")
BeforeEach(func() {
})
AfterEach(func() {
})
It("should expose a TCP service", func() {
f.NewEchoDeploymentWithReplicas(1)