From 527f8c01aab421811407a0dbe4868370e53cd7a2 Mon Sep 17 00:00:00 2001 From: esobmar Date: Mon, 17 Sep 2018 17:25:17 +0100 Subject: Fix NodeServlet Vulnerabilities Change-Id: I16a6a7c4f0a7ac1005878106f176a1dcf25940a3 Signed-off-by: Mariusz Sobucki Issue-ID: DMAAP-775 --- .../onap/dmaap/datarouter/node/NodeServletTest.java | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'datarouter-node/src/test/java/org') diff --git a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java index 048c44fa..fbdd9230 100644 --- a/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java +++ b/datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java @@ -86,24 +86,6 @@ public class NodeServletTest { verify(response).setStatus(eq(HttpServletResponse.SC_NO_CONTENT)); } - @Test - public void Given_Request_Is_HTTP_GET_And_Endpoint_Is_Internal_Logs_And_File_Does_Not_Exist_Then_Not_Found_Response_Is_Generated() throws Exception { - when(request.getPathInfo()).thenReturn("/internal/logs/fileName"); - when(request.getRemoteAddr()).thenReturn("135.207.136.128"); - nodeServlet.doGet(request, response); - verify(response).sendError(eq(HttpServletResponse.SC_NOT_FOUND)); - } - - @Test - public void Given_Request_Is_HTTP_GET_And_Endpoint_Is_Internal_Rtt_And_Error_Connecting_To_Socket_Occurs_Then_Ok_Response_Is_Generated() throws Exception { - when(request.getPathInfo()).thenReturn("/internal/rtt/0.0.0.0"); - when(request.getRemoteAddr()).thenReturn("135.207.136.128"); - ServletOutputStream outStream = mock(ServletOutputStream.class); - when(response.getOutputStream()).thenReturn(outStream); - nodeServlet.doGet(request, response); - verify(response).setStatus(eq(200)); - } - @Test public void Given_Request_Is_HTTP_GET_To_Invalid_Endpoint_Then_Not_Found_Response_Is_Generated() throws Exception { when(request.getPathInfo()).thenReturn("/incorrect"); -- cgit 1.2.3-korg