From fff6a12ae28859aa2d7e9799873a8f6b6d8d6b1d Mon Sep 17 00:00:00 2001 From: Jakob Edding <15202881+JakobEdding@users.noreply.github.com> Date: Mon, 22 Apr 2024 15:10:57 +0200 Subject: [PATCH] Bring back old methods as `@Deprecated` --- .../java/com/bakdata/kserve/KServeMock.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/testFixtures/java/com/bakdata/kserve/KServeMock.java b/src/testFixtures/java/com/bakdata/kserve/KServeMock.java index 4223bd2..1fec389 100644 --- a/src/testFixtures/java/com/bakdata/kserve/KServeMock.java +++ b/src/testFixtures/java/com/bakdata/kserve/KServeMock.java @@ -40,6 +40,28 @@ public abstract class KServeMock { abstract MockResponse getModelNotFoundResponse(String modelName); + /** + * Get the base endpoint of the mock. + * + * @return A base endpoint + * @deprecated This method is deprecated in favor of {@link #getServiceBaseUrl()}. + */ + @Deprecated + public String getBaseEndpoint() { + return ":" + this.mockWebServer.getPort(); + } + + /** + * Get the service name of the mock. + * + * @return A service name + * @deprecated This method is deprecated in favor of {@link #getServiceBaseUrl()}. + */ + @Deprecated + public String getServiceName() { + return this.mockWebServer.getHostName(); + } + public URL getServiceBaseUrl() { try { return new URL(