adjust tests to the new no-reload on cert update world
This commit is contained in:
parent
d8a3d616b4
commit
fe2ea692a6
2 changed files with 23 additions and 59 deletions
|
@ -103,8 +103,7 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
rc1, err := extractReloadCount(mf)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
// TODO: This is wrong. We should not require a reload when SSL is configured
|
||||
Expect(rc0).To(BeEquivalentTo(rc1 - 1))
|
||||
Expect(rc0).To(BeEquivalentTo(rc1))
|
||||
})
|
||||
|
||||
Context("given an ingress with TLS correctly configured", func() {
|
||||
|
@ -177,8 +176,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
Expect(restOfLogs).ToNot(ContainSubstring(logBackendReloadSuccess))
|
||||
})
|
||||
|
||||
// TODO: Fix
|
||||
/*
|
||||
It("falls back to using default certificate when secret gets deleted without reloading", func() {
|
||||
ing, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.Namespace).Get(host, metav1.GetOptions{})
|
||||
|
||||
|
@ -208,10 +205,8 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
By("skipping Nginx reload")
|
||||
// TODO: This is wrong. We should not require a reload when SSL is configured
|
||||
Expect(rc0).To(BeEquivalentTo(rc1 - 1))
|
||||
Expect(rc0).To(BeEquivalentTo(rc1))
|
||||
})
|
||||
*/
|
||||
|
||||
It("picks up a non-certificate only change", func() {
|
||||
newHost := "foo2.com"
|
||||
|
|
|
@ -166,37 +166,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
|
|||
})
|
||||
})
|
||||
|
||||
It("handles a non backend update", func() {
|
||||
var nginxConfig string
|
||||
f.WaitForNginxConfiguration(func(cfg string) bool {
|
||||
nginxConfig = cfg
|
||||
return true
|
||||
})
|
||||
|
||||
ingress, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.Namespace).Get("foo.com", metav1.GetOptions{})
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
ingress.Spec.TLS = []extensions.IngressTLS{
|
||||
{
|
||||
Hosts: []string{"foo.com"},
|
||||
SecretName: "foo.com",
|
||||
},
|
||||
}
|
||||
_, err = framework.CreateIngressTLSSecret(f.KubeClientSet,
|
||||
ingress.Spec.TLS[0].Hosts,
|
||||
ingress.Spec.TLS[0].SecretName,
|
||||
ingress.Namespace)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
_, err = f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.Namespace).Update(ingress)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
var newNginxConfig string
|
||||
f.WaitForNginxConfiguration(func(cfg string) bool {
|
||||
newNginxConfig = cfg
|
||||
return true
|
||||
})
|
||||
Expect(nginxConfig).ShouldNot(Equal(newNginxConfig))
|
||||
})
|
||||
|
||||
It("sets controllerPodsCount in Lua general configuration", func() {
|
||||
// https://github.com/curl/curl/issues/936
|
||||
curlCmd := fmt.Sprintf("curl --fail --silent http://localhost:%v/configuration/general", nginx.StatusPort)
|
||||
|
|
Loading…
Reference in a new issue