Skip to content

Commit

Permalink
Add unit test for MarkAutoTLSNotEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nak3 committed Mar 20, 2020
1 parent 7f018d0 commit 81e0c00
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/apis/serving/v1/route_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,14 @@ func TestRouteNotOwnCertificate(t *testing.T) {
apistest.CheckConditionFailed(r, RouteConditionCertificateProvisioned, t)
}

func TestRouteAutoTLSNotEnabled(t *testing.T) {
r := &RouteStatus{}
r.InitializeConditions()
r.MarkAutoTLSNotEnabled()

apistest.CheckConditionSucceeded(r, RouteConditionCertificateProvisioned, t)
}

func TestIngressNotConfigured(t *testing.T) {
r := &RouteStatus{}
r.InitializeConditions()
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/serving/v1alpha1/route_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,14 @@ func TestRouteNotOwnCertificate(t *testing.T) {
apistest.CheckConditionFailed(r, RouteConditionCertificateProvisioned, t)
}

func TestRouteAutoTLSNotEnabled(t *testing.T) {
r := &RouteStatus{}
r.InitializeConditions()
r.MarkAutoTLSNotEnabled()

apistest.CheckConditionSucceeded(r, RouteConditionCertificateProvisioned, t)
}

func TestIngressNotConfigured(t *testing.T) {
r := &RouteStatus{}
r.InitializeConditions()
Expand Down

0 comments on commit 81e0c00

Please sign in to comment.