Coverage for V2EndpointURL.
diff --git a/openstack/endpoint_location.go b/openstack/endpoint_location.go
index dc8265d..bd1d820 100644
--- a/openstack/endpoint_location.go
+++ b/openstack/endpoint_location.go
@@ -30,9 +30,6 @@
}
// Report an error if the options were ambiguous.
- if len(endpoints) == 0 {
- return "", gophercloud.ErrEndpointNotFound
- }
if len(endpoints) > 1 {
return "", fmt.Errorf("Discovered %d matching endpoints: %#v", len(endpoints), endpoints)
}
@@ -51,6 +48,7 @@
}
}
+ // Report an error if there were no matching endpoints.
return "", gophercloud.ErrEndpointNotFound
}