[
https://issues.apache.org/jira/browse/METRON-1700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16564020#comment-16564020
]
ASF GitHub Bot commented on METRON-1700:
----------------------------------------
Github user nickwallen commented on a diff in the pull request:
https://github.com/apache/metron/pull/1135#discussion_r206611264
--- Diff:
metron-interface/metron-rest/src/test/java/org/apache/metron/rest/controller/PcapControllerIntegrationTest.java
---
@@ -420,5 +420,55 @@ public void testRawDownload() throws Exception {
.andExpect(status().isNotFound());
}
+ @Test
+ public void testGetFixedFilterConfiguration() throws Exception {
+ MockPcapJob mockPcapJob = (MockPcapJob) wac.getBean("mockPcapJob");
+
+ mockPcapJob.setStatus(new
JobStatus().withJobId("jobId").withState(JobStatus.State.RUNNING));
+
+ this.mockMvc.perform(post(pcapUrl + "/fixed").with(httpBasic(user,
password)).with(csrf()).contentType(MediaType.parseMediaType("application/json;charset=UTF-8")).content(fixedJson))
+ .andExpect(status().isOk())
+
.andExpect(content().contentType(MediaType.parseMediaType("application/json;charset=UTF-8")))
+ .andExpect(jsonPath("$.jobId").value("jobId"))
+ .andExpect(jsonPath("$.jobStatus").value("RUNNING"));
+
+ this.mockMvc.perform(get(pcapUrl +
"/jobId/configuration").with(httpBasic(user, password)))
+ .andExpect(status().isOk())
+
.andExpect(content().contentType(MediaType.parseMediaType("application/json;charset=UTF-8")))
+ .andExpect(jsonPath("$.basePath").value("/base/path"))
+
.andExpect(jsonPath("$.finalOutputPath").value("/final/output/path"))
+ .andExpect(jsonPath("$.startTimeMs").value(10))
+ .andExpect(jsonPath("$.endTimeMs").value(20))
+ .andExpect(jsonPath("$.numReducers").value(2))
+ .andExpect(jsonPath("$.ipSrcAddr").value("192.168.1.2"))
+ .andExpect(jsonPath("$.ipDstAddr").value("192.168.1.1"))
+ .andExpect(jsonPath("$.ipSrcPort").value("2000"))
+ .andExpect(jsonPath("$.ipDstPort").value("1000"))
+ .andExpect(jsonPath("$.protocol").value("TCP"))
+ .andExpect(jsonPath("$.packetFilter").value("filter"))
+ .andExpect(jsonPath("$.includeReverse").value("true"));
+ }
+ @Test
+ public void testGeQueryFilterConfiguration() throws Exception {
--- End diff --
typo... testGeQueryFilterConfiguration != testGetQueryFilterConfiguration
> Create REST endpoint to get job configuration
> ---------------------------------------------
>
> Key: METRON-1700
> URL: https://issues.apache.org/jira/browse/METRON-1700
> Project: Metron
> Issue Type: Sub-task
> Reporter: Ryan Merriman
> Priority: Major
>
> We need a REST endpoint that will allow us to retrieve the job configuration
> properties.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)