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

    https://github.com/apache/incubator-metron/pull/338#discussion_r86225445
  
    --- Diff: 
metron-platform/metron-parsers/src/test/java/org/apache/metron/parsers/JSParserTest.java
 ---
    @@ -0,0 +1,81 @@
    +package org.apache.metron.parsers;
    +
    +import java.util.HashMap;
    +import java.util.List;
    +import java.util.Map;
    +
    +import org.adrianwalker.multilinestring.Multiline;
    +
    +public class JSParserTest extends ScriptParserTest {
    +
    +   /**
    +       {
    +       "customerId":117,
    +      "first_name":"karthik",
    +      "last_name":"narayanan",
    +      "age":"38",
    +      "login-time":"2016-01-28 15:29:48",
    +      "ip-address":"216.21.170.221",
    +      "os":"windows 10",
    +      "device":"Dell Inspiron"
    +      }
    +      */
    +     @Multiline
    +     public String result=" {"+
    +      "\"source\":\"userlog\","+
    +       "\"customerId\":117,"+
    +      "\"first_name\":\"karthik\","+
    +      "\"last_name\":\"narayanan\","+
    +      "\"age\":\"38\","+
    +      "\"login-time\":\"2016-01-28 15:29:48\","+
    +      "\"ip-address\":\"216.21.170.221\","+
    +      "\"os\":\"windows 10\","+
    +      "\"device\":\"Dell Inspiron\""+
    +      "\"original_string\":\"2016-01-28 
15:29:48|117|karthik|narayanan|38|216.21.170.221|windows 10|Dell Inspiron\""+
    +      "}";
    +     
    +   @Override
    +   public Map getTestData() {
    +           Map testData = new HashMap<String,String>();
    +       String input = "2016-01-28 
15:29:48|117|karthik|narayanan|38|216.21.170.221|windows 10|Dell Inspiron";
    +       testData.put(input,result);
    +       return testData;
    +   }
    +
    +   @Override
    +   public String getScriptPath() {
    +           // TODO Auto-generated method stub
    +           return 
"../metron-integration-test/src/main/sample/scripts/test.js";
    +   }
    +
    +   @Override
    +   public String getParseFunction() {
    +           // TODO Auto-generated method stub
    +           return "parse";
    +   }
    +
    +   @Override
    +   public String getLanguage() {
    +           // TODO Auto-generated method stub
    --- End diff --
    
    Remove


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to