From f6ffaedd36f42e5c6ffcd8031bc842fa2b994ed2 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Sun, 6 Nov 2022 21:16:41 -0500 Subject: [PATCH] fix broken test compile --- .../net/web/http/generic/CorsEnablingHandlerTest.java | 8 +++++++- .../net/web/http/generic/CorsOptionsHandlerTest.java | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/cryostat/net/web/http/generic/CorsEnablingHandlerTest.java b/src/test/java/io/cryostat/net/web/http/generic/CorsEnablingHandlerTest.java index 202e3ce93f..63a5cfc1c8 100644 --- a/src/test/java/io/cryostat/net/web/http/generic/CorsEnablingHandlerTest.java +++ b/src/test/java/io/cryostat/net/web/http/generic/CorsEnablingHandlerTest.java @@ -37,7 +37,10 @@ */ package io.cryostat.net.web.http.generic; +import io.cryostat.core.log.Logger; import io.cryostat.core.sys.Environment; +import io.cryostat.net.NetworkConfiguration; +import io.cryostat.net.SslConfiguration; import io.cryostat.net.web.WebServer; import io.cryostat.net.web.http.AbstractAuthenticatedRequestHandler; import io.cryostat.net.web.http.RequestHandler; @@ -67,12 +70,15 @@ class CorsEnablingHandlerTest { final String CUSTOM_ORIGIN = "http://localhost:9001"; CorsEnablingHandler handler; @Mock Environment env; + @Mock NetworkConfiguration netConf; + @Mock SslConfiguration sslConf; + @Mock Logger logger; @BeforeEach void setup() { Mockito.when(env.getEnv("CRYOSTAT_CORS_ORIGIN", CorsEnablingHandler.DEV_ORIGIN)) .thenReturn(CUSTOM_ORIGIN); - this.handler = new CorsEnablingHandler(env); + this.handler = new CorsEnablingHandler(env, netConf, sslConf, logger); } @Test diff --git a/src/test/java/io/cryostat/net/web/http/generic/CorsOptionsHandlerTest.java b/src/test/java/io/cryostat/net/web/http/generic/CorsOptionsHandlerTest.java index 197cbef93f..fd61d4eba1 100644 --- a/src/test/java/io/cryostat/net/web/http/generic/CorsOptionsHandlerTest.java +++ b/src/test/java/io/cryostat/net/web/http/generic/CorsOptionsHandlerTest.java @@ -37,7 +37,10 @@ */ package io.cryostat.net.web.http.generic; +import io.cryostat.core.log.Logger; import io.cryostat.core.sys.Environment; +import io.cryostat.net.NetworkConfiguration; +import io.cryostat.net.SslConfiguration; import io.cryostat.net.web.http.RequestHandler; import io.vertx.core.http.HttpMethod; @@ -55,12 +58,15 @@ class CorsOptionsHandlerTest { CorsOptionsHandler handler; @Mock Environment env; + @Mock NetworkConfiguration netConf; + @Mock SslConfiguration sslConf; + @Mock Logger logger; @BeforeEach void setup() { Mockito.when(env.getEnv("CRYOSTAT_CORS_ORIGIN", CorsEnablingHandler.DEV_ORIGIN)) .thenReturn("http://localhost:9000"); - this.handler = new CorsOptionsHandler(env); + this.handler = new CorsOptionsHandler(env, netConf, sslConf, logger); } @Test