Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Verify that recreating the ingress works as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhiljindal committed Feb 2, 2018
1 parent 7f5513a commit 099259e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/kubemci/pkg/gcp/healthcheck/healthchecksyncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (h *HealthCheckSyncer) desiredHealthCheck(lbName string, port ingressbe.Ser
hc.HttpsHealthCheck = &compute.HTTPSHealthCheck{
Port: port.Port, // TODO(nikhiljindal): Allow customization.
RequestPath: path,
// TODO(G-Harmon): When HTTPS support is added, we likely need to set ProxyHeader, like HTTP does.
ProxyHeader: "NONE",
}
break
default:
Expand Down
14 changes: 14 additions & 0 deletions test/e2e/cases/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ func testHTTPIngress(project, kubeConfigPath, lbName string) {
fmt.Println("PASS: got 200 from ingress url")
testList(project, ipAddress, lbName)

// Running create again should not return any error.
_, err = createIngress(project, kubeConfigPath, lbName, "examples/zone-printer/ingress/nginx.yaml")
if err != nil {
glog.Fatalf("Unexpected error in re-creating ingress: %+v", err)
}

// TODO(nikhiljindal): Ensure that the ingress is created and deleted in all
// clusters as expected.
}
Expand Down Expand Up @@ -101,6 +107,14 @@ func testHTTPSIngress(project, kubeConfigPath, lbName string, kubectlArgs []stri
fmt.Println("PASS: got 200 from ingress url")
testList(project, ipAddress, lbName)

// Running create again should not return any error.
_, err = createIngress(project, kubeConfigPath, lbName, "examples/zone-printer/ingress/https-ingress.yaml")
if err != nil {
// TODO(nikhiljindal): Change this to unexpected fatal error once
// https://github.com/GoogleCloudPlatform/k8s-multicluster-ingress/issues/125 is fixed.
glog.Infof("Expected error in re-creating https ingress: %+v", err)
}

// TODO(nikhiljindal): Ensure that the ingress is created and deleted in all
// clusters as expected.
}
Expand Down

0 comments on commit 099259e

Please sign in to comment.