Router sets its dns name in admitted routes test
This is a unit test case for code in PR12195
@@ -49,7 +49,7 @@ func TestStatusNoOp(t *testing.T) {
touched := unversioned.Time{Time: now.Add(-time.Minute)}
p := &fakePlugin{}
c := testclient.NewSimpleFake()
- admitter := NewStatusAdmitter(p, c, "test", "")
+ admitter := NewStatusAdmitter(p, c, "test", "a.b.c.d")
err := admitter.HandleRoute(watch.Added, &routeapi.Route{
ObjectMeta: kapi.ObjectMeta{Name: "route1", Namespace: "default", UID: types.UID("uid1")},
Spec: routeapi.RouteSpec{Host: "route1.test.local"},
@@ -58,6 +58,7 @@ func TestStatusNoOp(t *testing.T) {
{
Host: "route1.test.local",
RouterName: "test",
+ RouterCanonicalHostname: "a.b.c.d",
Conditions: []routeapi.RouteIngressCondition{
{
Type: routeapi.RouteAdmitted,
