cleanup redundant code
This commit is contained in:
parent
84385a01bb
commit
0837e81c7f
1 changed files with 3 additions and 8 deletions
|
@ -29,7 +29,6 @@ import (
|
||||||
|
|
||||||
appsv1beta1 "k8s.io/api/apps/v1beta1"
|
appsv1beta1 "k8s.io/api/apps/v1beta1"
|
||||||
extensions "k8s.io/api/extensions/v1beta1"
|
extensions "k8s.io/api/extensions/v1beta1"
|
||||||
v1beta1 "k8s.io/api/extensions/v1beta1"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/util/intstr"
|
"k8s.io/apimachinery/pkg/util/intstr"
|
||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
|
@ -74,9 +73,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
|
||||||
Expect(log).To(ContainSubstring("first sync of Nginx configuration"))
|
Expect(log).To(ContainSubstring("first sync of Nginx configuration"))
|
||||||
})
|
})
|
||||||
|
|
||||||
AfterEach(func() {
|
|
||||||
})
|
|
||||||
|
|
||||||
Context("when only backends change", func() {
|
Context("when only backends change", func() {
|
||||||
It("should handle endpoints only changes", func() {
|
It("should handle endpoints only changes", func() {
|
||||||
resp, _, errs := gorequest.New().
|
resp, _, errs := gorequest.New().
|
||||||
|
@ -146,7 +142,7 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
|
||||||
ingress, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.IngressController.Namespace).Get("foo.com", metav1.GetOptions{})
|
ingress, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.IngressController.Namespace).Get("foo.com", metav1.GetOptions{})
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
|
|
||||||
ingress.Spec.TLS = []v1beta1.IngressTLS{
|
ingress.Spec.TLS = []extensions.IngressTLS{
|
||||||
{
|
{
|
||||||
Hosts: []string{"foo.com"},
|
Hosts: []string{"foo.com"},
|
||||||
SecretName: "foo.com",
|
SecretName: "foo.com",
|
||||||
|
@ -187,7 +183,6 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
|
||||||
})
|
})
|
||||||
Expect(err).NotTo(HaveOccurred())
|
Expect(err).NotTo(HaveOccurred())
|
||||||
})
|
})
|
||||||
|
|
||||||
Context("when session affinity annotation is present", func() {
|
Context("when session affinity annotation is present", func() {
|
||||||
It("should use sticky sessions when ingress rules are configured", func() {
|
It("should use sticky sessions when ingress rules are configured", func() {
|
||||||
cookieName := "STICKYSESSION"
|
cookieName := "STICKYSESSION"
|
||||||
|
@ -256,8 +251,8 @@ var _ = framework.IngressNginxDescribe("Dynamic Configuration", func() {
|
||||||
By("Updating affinity annotation and rules on ingress")
|
By("Updating affinity annotation and rules on ingress")
|
||||||
ingress, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.IngressController.Namespace).Get("foo.com", metav1.GetOptions{})
|
ingress, err := f.KubeClientSet.ExtensionsV1beta1().Ingresses(f.IngressController.Namespace).Get("foo.com", metav1.GetOptions{})
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
ingress.Spec = v1beta1.IngressSpec{
|
ingress.Spec = extensions.IngressSpec{
|
||||||
Backend: &v1beta1.IngressBackend{
|
Backend: &extensions.IngressBackend{
|
||||||
ServiceName: "http-svc",
|
ServiceName: "http-svc",
|
||||||
ServicePort: intstr.FromInt(80),
|
ServicePort: intstr.FromInt(80),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue