add WithLegacy function to our fake discovery client

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Luca Comellini <luca.com@gmail.com>
This commit is contained in:
Tim Ramlot 2022-12-12 10:01:42 +01:00 committed by Luca Comellini
parent c99c147059
commit 26d04f3d8a
No known key found for this signature in database
GPG Key ID: 4850B36E838507C6

View File

@ -101,6 +101,12 @@ func (d *Discovery) OpenAPIV3() openapi.Client {
return d.openAPIV3SchemaFn()
}
func (d *Discovery) WithLegacy() discovery.DiscoveryInterface {
// setting the discovery client to legacy mode (not using the aggregated discovery client) doesn't
// make any difference for our testing purposes here, so we just return the same discovery client
return d
}
func (d *Discovery) RESTClient() restclient.Interface {
return d.restClientFn()
}