From f5299fe7e15c0cfe8b323f65b26e6a0476887a1f Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 27 Nov 2017 14:01:32 -0500 Subject: [PATCH] Skip TestRoutes if extension or router-id is missing --- .../providers/openstack/openstack_routes_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/openstack/openstack_routes_test.go b/pkg/cloudprovider/providers/openstack/openstack_routes_test.go index 2cfdc7d8f79..6e4d506d8de 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_routes_test.go +++ b/pkg/cloudprovider/providers/openstack/openstack_routes_test.go @@ -37,9 +37,13 @@ func TestRoutes(t *testing.T) { t.Fatalf("Failed to construct/authenticate OpenStack: %s", err) } + if os.routeOpts.RouterId == "" { + t.Skip("router-id is empty. skipping test") + } + r, ok := os.Routes() if !ok { - t.Fatalf("Routes() returned false - perhaps your stack doens't support Neutron?") + t.Skip("Routes() returned false - perhaps your stack does not support Neutron extraroute extension?") } newroute := cloudprovider.Route{