Skip to content

Commit

Permalink
internal/dag: add test for issue 1348
Browse files Browse the repository at this point in the history
Fixes #1348

Add test for same failure as #1347

Signed-off-by: Dave Cheney <[email protected]>
  • Loading branch information
davecheney committed Sep 5, 2019
1 parent 6981439 commit 8af0944
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions internal/dag/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,27 @@ func TestDAGIngressRouteStatus(t *testing.T) {
},
}

ir26 := &ingressroutev1.IngressRoute{
ObjectMeta: metav1.ObjectMeta{
Name: "app-with-tls-delegation",
Namespace: "roots",
},
Spec: ingressroutev1.IngressRouteSpec{
VirtualHost: &projcontour.VirtualHost{
Fqdn: "app-with-tls-delegation.127.0.0.1.nip.io",
TLS: &projcontour.TLS{
SecretName: sec2.Namespace + "/" + sec2.Name,
},
},
Routes: []ingressroutev1.Route{{
Services: []ingressroutev1.Service{{
Name: "sample-app",
Port: 80,
}},
}},
},
}

tests := map[string]struct {
objs []interface{}
want map[Meta]Status
Expand Down Expand Up @@ -839,6 +860,20 @@ func TestDAGIngressRouteStatus(t *testing.T) {
},
},
},
// issue 1348
"check status set when routes combined with tls delegation failure": {
objs: []interface{}{
sec2,
ir26,
},
want: map[Meta]Status{
{name: ir26.Name, namespace: ir26.Namespace}: {
Object: ir26,
Status: StatusInvalid,
Description: sec2.Namespace + "/" + sec2.Name + ": certificate delegation not permitted",
},
},
},
}

for name, tc := range tests {
Expand Down

0 comments on commit 8af0944

Please sign in to comment.