From 056b317614cdd3e42d428ca08de2ca597a176ea6 Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Tue, 30 May 2023 19:36:13 +0200 Subject: [PATCH 1/2] Mock /rancherversion Signed-off-by: Francesco Torchia --- src/jetstream/plugins/epinio/main.go | 3 +++ .../plugins/epinio/rancherproxy/steve/mock.go | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/jetstream/plugins/epinio/rancherproxy/steve/mock.go diff --git a/src/jetstream/plugins/epinio/main.go b/src/jetstream/plugins/epinio/main.go index 2dc3da35f5..142dacc232 100644 --- a/src/jetstream/plugins/epinio/main.go +++ b/src/jetstream/plugins/epinio/main.go @@ -170,6 +170,9 @@ func (epinio *Epinio) AddRootGroupRoutes(echoGroup *echo.Group) { rancherProxyGroup := epinioGroup.Group("/rancher") + // Mock /rancherversion + rancherProxyGroup.GET("/rancherversion", steveProxy.GetRancherVersion) + // Rancher Steve API steveGroup := rancherProxyGroup.Group("/v1") steveGroup.Use(p.SetSecureCacheContentMiddleware) diff --git a/src/jetstream/plugins/epinio/rancherproxy/steve/mock.go b/src/jetstream/plugins/epinio/rancherproxy/steve/mock.go new file mode 100644 index 0000000000..65d06e5d29 --- /dev/null +++ b/src/jetstream/plugins/epinio/rancherproxy/steve/mock.go @@ -0,0 +1,12 @@ +package steve + +import ( + _ "embed" + "net/http" + + "github.com/labstack/echo/v4" +) + +func GetRancherVersion(c echo.Context) error { + return c.JSON(http.StatusOK, "") +} From 8524db66f382bf96270f06922cb3b90e5ffccf32 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Thu, 1 Jun 2023 17:19:42 +0100 Subject: [PATCH 2/2] rename mock --> rancherversion --- .../epinio/rancherproxy/steve/{mock.go => rancherversion.go} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/jetstream/plugins/epinio/rancherproxy/steve/{mock.go => rancherversion.go} (100%) diff --git a/src/jetstream/plugins/epinio/rancherproxy/steve/mock.go b/src/jetstream/plugins/epinio/rancherproxy/steve/rancherversion.go similarity index 100% rename from src/jetstream/plugins/epinio/rancherproxy/steve/mock.go rename to src/jetstream/plugins/epinio/rancherproxy/steve/rancherversion.go