summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--container-integration-test/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java14
-rw-r--r--container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java24
2 files changed, 19 insertions, 19 deletions
diff --git a/container-integration-test/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java b/container-integration-test/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java
index 1c6b9c329fb..5fd73afe800 100644
--- a/container-integration-test/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java
+++ b/container-integration-test/src/test/java/com/yahoo/search/query/gui/GUIHandlerTest.java
@@ -5,13 +5,13 @@ import com.yahoo.application.Networking;
import com.yahoo.application.container.JDisc;
import com.yahoo.application.container.handler.Request;
import com.yahoo.application.container.handler.Response;
+
import org.junit.After;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-
import java.io.IOException;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
@@ -24,7 +24,7 @@ public class GUIHandlerTest {
@Before
public void startContainer() {
- container = JDisc.fromServicesXml(servicesXml(), Networking.enable);
+ container = JDisc.fromServicesXml(servicesXml(), Networking.disable);
}
@After
@@ -63,10 +63,10 @@ public class GUIHandlerTest {
private void assertResponse(Request.Method method, String path, String expectedStartString, String expectedContentType, int expectedStatusCode) throws IOException {
Response response = container.handleRequest(new Request("http://localhost:8080" + path, new byte[0], method));
- Assert.assertEquals("Status code", expectedStatusCode, response.getStatus());
- Assert.assertEquals(expectedContentType, response.getHeaders().getFirst("Content-Type"));
+ assertEquals("Status code", expectedStatusCode, response.getStatus());
+ assertEquals(expectedContentType, response.getHeaders().getFirst("Content-Type"));
if(expectedStartString != null){
- Assert.assertTrue(response.getBodyAsString().startsWith(expectedStartString));
+ assertTrue(response.getBodyAsString().startsWith(expectedStartString));
}
}
diff --git a/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java b/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java
index d24ab1e6128..d17ddc9b7f9 100644
--- a/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java
+++ b/container-search-gui/src/main/java/com/yahoo/search/query/gui/GUIHandler.java
@@ -94,29 +94,29 @@ public class GUIHandler extends LoggingRequestHandler {
return "application/javascript";
} else if (path.endsWith(".html")) {
return "text/html";
- }else if (path.endsWith(".php")) {
+ } else if (path.endsWith(".php")) {
return "text/php";
- }else if (path.endsWith(".svg")) {
+ } else if (path.endsWith(".svg")) {
return "image/svg+xml";
- }else if (path.endsWith(".eot")) {
+ } else if (path.endsWith(".eot")) {
return "application/vnd.ms-fontobject";
- }else if (path.endsWith(".ttf")) {
+ } else if (path.endsWith(".ttf")) {
return "font/ttf";
- }else if (path.endsWith(".woff")) {
+ } else if (path.endsWith(".woff")) {
return "font/woff";
- }else if (path.endsWith(".woff2")) {
+ } else if (path.endsWith(".woff2")) {
return "font/woff2";
- }else if (path.endsWith(".otf")) {
+ } else if (path.endsWith(".otf")) {
return "font/otf";
- }else if (path.endsWith(".png")) {
+ } else if (path.endsWith(".png")) {
return "image/png";
- }else if (path.endsWith(".xml")) {
+ } else if (path.endsWith(".xml")) {
return "application/xml";
- }else if (path.endsWith(".ico")) {
+ } else if (path.endsWith(".ico")) {
return "image/x-icon";
- }else if (path.endsWith(".json")) {
+ } else if (path.endsWith(".json")) {
return "application/json";
- }else if (path.endsWith(".ttf")) {
+ } else if (path.endsWith(".ttf")) {
return "font/ttf";
}
return "text/html";