Refactor e2e tests to use the service ClusterIP
This commit is contained in:
parent
f04361cc06
commit
5e249d3366
80 changed files with 777 additions and 706 deletions
|
|
@ -37,12 +37,12 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
BeforeEach(func() {
|
||||
f.NewEchoDeploymentWithReplicas(1)
|
||||
|
||||
framework.UpdateDeployment(f.KubeClientSet, f.IngressController.Namespace, "nginx-ingress-controller", 1,
|
||||
framework.UpdateDeployment(f.KubeClientSet, f.Namespace, "nginx-ingress-controller", 1,
|
||||
func(deployment *appsv1beta1.Deployment) error {
|
||||
args := deployment.Spec.Template.Spec.Containers[0].Args
|
||||
args = append(args, fmt.Sprintf("--default-backend-service=%s/%s", f.IngressController.Namespace, "http-svc"))
|
||||
args = append(args, fmt.Sprintf("--default-backend-service=%s/%s", f.Namespace, "http-svc"))
|
||||
deployment.Spec.Template.Spec.Containers[0].Args = args
|
||||
_, err := f.KubeClientSet.AppsV1beta1().Deployments(f.IngressController.Namespace).Update(deployment)
|
||||
_, err := f.KubeClientSet.AppsV1beta1().Deployments(f.Namespace).Update(deployment)
|
||||
|
||||
return err
|
||||
})
|
||||
|
|
@ -54,7 +54,7 @@ var _ = framework.IngressNginxDescribe("Dynamic Certificate", func() {
|
|||
})
|
||||
|
||||
It("uses custom default backend", func() {
|
||||
resp, _, errs := gorequest.New().Get(f.IngressController.HTTPURL).End()
|
||||
resp, _, errs := gorequest.New().Get(f.GetURL(framework.HTTP)).End()
|
||||
Expect(errs).Should(BeEmpty())
|
||||
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
|
||||
})
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ var _ = framework.IngressNginxDescribe("Default backend", func() {
|
|||
|
||||
switch test.Scheme {
|
||||
case framework.HTTP:
|
||||
cm = request.CustomMethod(test.Method, f.IngressController.HTTPURL)
|
||||
cm = request.CustomMethod(test.Method, f.GetURL(framework.HTTP))
|
||||
case framework.HTTPS:
|
||||
cm = request.CustomMethod(test.Method, f.IngressController.HTTPSURL)
|
||||
cm = request.CustomMethod(test.Method, f.GetURL(framework.HTTPS))
|
||||
// the default backend uses a self generated certificate
|
||||
cm.Transport = &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ var _ = framework.IngressNginxDescribe("Default backend - SSL", func() {
|
|||
It("should return a self generated SSL certificate", func() {
|
||||
By("checking SSL Certificate using the NGINX IP address")
|
||||
resp, _, errs := gorequest.New().
|
||||
Post(f.IngressController.HTTPSURL).
|
||||
Post(f.GetURL(framework.HTTPS)).
|
||||
TLSClientConfig(&tls.Config{
|
||||
// the default backend uses a self generated certificate
|
||||
InsecureSkipVerify: true,
|
||||
|
|
@ -53,7 +53,7 @@ var _ = framework.IngressNginxDescribe("Default backend - SSL", func() {
|
|||
|
||||
By("checking SSL Certificate using the NGINX catch all server")
|
||||
resp, _, errs = gorequest.New().
|
||||
Post(f.IngressController.HTTPSURL).
|
||||
Post(f.GetURL(framework.HTTPS)).
|
||||
TLSClientConfig(&tls.Config{
|
||||
// the default backend uses a self generated certificate
|
||||
InsecureSkipVerify: true,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ var _ = framework.IngressNginxDescribe("Default backend with hosts", func() {
|
|||
ing := &extensions.Ingress{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "default-backend-annotations",
|
||||
Namespace: f.IngressController.Namespace,
|
||||
Namespace: f.Namespace,
|
||||
Annotations: annotations,
|
||||
},
|
||||
Spec: extensions.IngressSpec{
|
||||
|
|
@ -71,7 +71,7 @@ var _ = framework.IngressNginxDescribe("Default backend with hosts", func() {
|
|||
})
|
||||
|
||||
resp, _, errs := gorequest.New().
|
||||
Get(f.IngressController.HTTPURL).
|
||||
Get(f.GetURL(framework.HTTP)).
|
||||
Set("Host", "foo.com").
|
||||
End()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue