From 26d04f3d8aff1b4e6cf80bffff4e48ab003ec93f Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Mon, 12 Dec 2022 10:01:42 +0100 Subject: [PATCH] add WithLegacy function to our fake discovery client Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> Signed-off-by: Luca Comellini --- test/unit/discovery/discovery.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/discovery/discovery.go b/test/unit/discovery/discovery.go index e73ff6c47..d7a8fd14c 100644 --- a/test/unit/discovery/discovery.go +++ b/test/unit/discovery/discovery.go @@ -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() }