diff options
author | 2018-09-20 15:44:26 +0000 | |
---|---|---|
committer | 2018-09-20 15:44:26 +0000 | |
commit | 46ef61c0fe477483be17dbf9af2ef3b1023da0d8 (patch) | |
tree | 8b90efd9a4ac62748fc4a39f67dfdf77e5dae3e6 /datarouter-node/src/test/java/org/onap | |
parent | 7db6b77e880c77da2489eedd5bfa85524c5b6e72 (diff) | |
parent | 527f8c01aab421811407a0dbe4868370e53cd7a2 (diff) |
Merge "Fix NodeServlet Vulnerabilities"
Diffstat (limited to 'datarouter-node/src/test/java/org/onap')
-rw-r--r-- | datarouter-node/src/test/java/org/onap/dmaap/datarouter/node/NodeServletTest.java | 18 |
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); |