diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/server/IndexHtmlServletTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/server/IndexHtmlServletTest.java index 22af77db147..6ec66630b36 100644 --- a/zeppelin-server/src/test/java/org/apache/zeppelin/server/IndexHtmlServletTest.java +++ b/zeppelin-server/src/test/java/org/apache/zeppelin/server/IndexHtmlServletTest.java @@ -25,11 +25,12 @@ import java.io.IOException; import java.io.PrintWriter; import java.net.URL; - +import java.nio.file.Files; +import java.nio.file.Path; import org.apache.zeppelin.conf.ZeppelinConfiguration; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; import jakarta.servlet.ServletConfig; import jakarta.servlet.ServletContext; @@ -43,8 +44,8 @@ class IndexHtmlServletTest { private final static String TEST_HEAD_ADDON = ""; private final static String FILE_PATH_INDEX_HTML_ZEPPELIN_WEB = "../zeppelin-web/dist/index.html"; - private final static String FILE_PATH_INDEX_HTML_ZEPPELIN_WEB_ANGULAR = "../zeppelin-web-angular/dist/zeppelin/index.html"; - + @TempDir + Path tempDir; @Test void testZeppelinWebHtmlAddon() throws IOException, ServletException { @@ -80,16 +81,24 @@ void testZeppelinWebHtmlAddon() throws IOException, ServletException { } @Test - @Disabled("ignored due to zeppelin-web-angular not build for core tests") void testZeppelinWebAngularHtmlAddon() throws IOException, ServletException { ZeppelinConfiguration zConf = mock(ZeppelinConfiguration.class); when(zConf.getHtmlBodyAddon()).thenReturn(TEST_BODY_ADDON); when(zConf.getHtmlHeadAddon()).thenReturn(TEST_HEAD_ADDON); + Path indexHtml = tempDir.resolve("index.html"); + Files.writeString( + indexHtml, + "\n" + + "\n" + + "