Github user cestella commented on a diff in the pull request:

    https://github.com/apache/metron/pull/827#discussion_r149418025
  
    --- Diff: 
metron-interface/metron-rest/src/test/java/org/apache/metron/rest/controller/SearchControllerIntegrationTest.java
 ---
    @@ -236,17 +236,14 @@ public void test() throws Exception {
                 
.andExpect(jsonPath("$.groupResults[0].groupResults[0].score").value(50));
     
         this.mockMvc.perform(post(searchUrl + 
"/column/metadata").with(httpBasic(user, 
password)).with(csrf()).contentType(MediaType.parseMediaType("application/json;charset=UTF-8")).content("[\"bro\",\"snort\"]"))
    -            .andExpect(status().isOk())
    -            
.andExpect(content().contentType(MediaType.parseMediaType("application/json;charset=UTF-8")))
    -            .andExpect(jsonPath("$.*", hasSize(2)))
    -            
.andExpect(jsonPath("$.bro.common_string_field").value("string"))
    -            
.andExpect(jsonPath("$.bro.common_integer_field").value("integer"))
    -            .andExpect(jsonPath("$.bro.bro_field").value("boolean"))
    -            .andExpect(jsonPath("$.bro.duplicate_field").value("date"))
    -            
.andExpect(jsonPath("$.snort.common_string_field").value("string"))
    -            
.andExpect(jsonPath("$.snort.common_integer_field").value("integer"))
    -            .andExpect(jsonPath("$.snort.snort_field").value("double"))
    -            .andExpect(jsonPath("$.snort.duplicate_field").value("long"));
    +        .andExpect(status().isOk())
    --- End diff --
    
    Just some historical color to this discussion.  metron-rest's tests do not 
assume ES, rather the ES Dao tests are in metron-elasticsearch.  The idea was 
that metron-rest should have a runtime dependency on the index being used, 
rather than a compile-time dependency.  The thought was that the testing for 
the controller and such should assume an implementation of the DAO that 
conforms to the interface allowing the ES DAO tests to ensure that it's 
conforming to the expectations of the interface independently.


---

Reply via email to