Remove empty BeforeEach and AfterEach from e2e tests
This commit is contained in:
parent
b37270bdde
commit
0197ea0dc4
52 changed files with 0 additions and 178 deletions
|
@ -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{
|
||||
|
|
|
@ -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{}
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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))
|
||||
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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{}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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().
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue