Cleanup of e2e docker images (#4962)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2020-01-25 17:43:21 -03:00 committed by GitHub
parent a8a827a806
commit 1443ebf5a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 79 additions and 190 deletions

View file

@ -96,12 +96,13 @@ var _ = framework.IngressNginxDescribe("Default backend", func() {
Expect(resp.StatusCode).Should(Equal(test.Status))
}
})
It("enables access logging for default backend", func() {
f.UpdateNginxConfigMapData("enable-access-log-for-default-backend", "true")
host := "foo"
resp, _, errs := gorequest.New().
Get(f.GetURL(framework.HTTP)+"/somethingOne").
Set("Host", host).
Set("Host", "foo").
End()
Expect(len(errs)).Should(Equal(0))
@ -114,10 +115,10 @@ var _ = framework.IngressNginxDescribe("Default backend", func() {
It("disables access logging for default backend", func() {
f.UpdateNginxConfigMapData("enable-access-log-for-default-backend", "false")
host := "bar"
resp, _, errs := gorequest.New().
Get(f.GetURL(framework.HTTP)+"/somethingTwo").
Set("Host", host).
Set("Host", "bar").
End()
Expect(len(errs)).Should(Equal(0))

View file

@ -59,6 +59,7 @@ var _ = framework.IngressNginxDescribe("Default backend - SSL", func() {
InsecureSkipVerify: true,
}).
Set("Host", "foo.bar.com").End()
Expect(errs).Should(BeEmpty())
Expect(len(resp.TLS.PeerCertificates)).Should(BeNumerically("==", 1))
for _, pc := range resp.TLS.PeerCertificates {

View file

@ -332,6 +332,7 @@ func (f *Framework) UpdateNginxConfigMapData(key string, value string) {
config[key] = value
f.SetNginxConfigMapData(config)
time.Sleep(1 * time.Second)
}
// DeleteNGINXPod deletes the currently running pod. It waits for the replacement pod to be up.

View file

@ -50,6 +50,8 @@ var _ = framework.IngressNginxDescribe("Shutdown ingress controller", func() {
return Expect(server).Should(ContainSubstring("server_name shutdown"))
})
time.Sleep(1 * time.Second)
resp, _, _ := gorequest.New().
Get(f.GetURL(framework.HTTP)+"/sleep/1").
Set("Host", host).
@ -89,6 +91,8 @@ var _ = framework.IngressNginxDescribe("Shutdown ingress controller", func() {
return Expect(server).Should(ContainSubstring("server_name shutdown"))
})
time.Sleep(1 * time.Second)
result := make(chan *asyncResult)
startTime := time.Now()
@ -148,6 +152,8 @@ var _ = framework.IngressNginxDescribe("Shutdown ingress controller", func() {
return Expect(server).Should(ContainSubstring("server_name shutdown"))
})
time.Sleep(1 * time.Second)
result := make(chan *asyncResult)
startTime := time.Now()