summaryrefslogtreecommitdiffstats
path: root/datarouter-node/src/test
diff options
context:
space:
mode:
authoresobmar <mariusz.sobucki@ericsson.com>2018-09-17 17:25:17 +0100
committeresobmar <mariusz.sobucki@ericsson.com>2018-09-20 14:41:27 +0100
commit527f8c01aab421811407a0dbe4868370e53cd7a2 (patch)
treec0ee999a96c940db8213804b9a9656a9f20a42ca /datarouter-node/src/test
parent4e61cfafc9b10ca604b8e2c7ec0272246502fa82 (diff)
Fix NodeServlet Vulnerabilities
Change-Id: I16a6a7c4f0a7ac1005878106f176a1dcf25940a3 Signed-off-by: Mariusz Sobucki <mariusz.sobucki@ericsson.com> Issue-ID: DMAAP-775
Diffstat (limited to 'datarouter-node/src/test')
-rw-r--r--datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java18
1 files changed, 0 insertions, 18 deletions
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
@@ -87,24 +87,6 @@ public class NodeServletTest {
}
@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");
nodeServlet.doGet(request, response);