ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mgerg...@apache.org
Subject ambari git commit: AMBARI-21181 APPENDUM Ability to anonymize data during log processing (mgergely)
Date Mon, 19 Jun 2017 13:01:43 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 49da047ec -> cedb42881


AMBARI-21181 APPENDUM Ability to anonymize data during log processing (mgergely)

Change-Id: If1ad15b3895880b990d0cc7e7d84700d99e28bb6


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cedb4288
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cedb4288
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cedb4288

Branch: refs/heads/trunk
Commit: cedb428812c0e3acc4dc33d6b56eee750c1b05d4
Parents: 49da047
Author: Miklos Gergely <mgergely@hortonworks.com>
Authored: Mon Jun 19 14:45:05 2017 +0200
Committer: Miklos Gergely <mgergely@hortonworks.com>
Committed: Mon Jun 19 15:01:26 2017 +0200

----------------------------------------------------------------------
 .../apache/ambari/logfeeder/mapper/MapperAnonymizeTest.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cedb4288/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/mapper/MapperAnonymizeTest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/mapper/MapperAnonymizeTest.java
b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/mapper/MapperAnonymizeTest.java
index a0b96c0..b6a527d 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/mapper/MapperAnonymizeTest.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/test/java/org/apache/ambari/logfeeder/mapper/MapperAnonymizeTest.java
@@ -45,7 +45,7 @@ public class MapperAnonymizeTest {
     Map<String, Object> jsonObj = new HashMap<>();
     mapperAnonymize.apply(jsonObj, "something else secret SECRET1 / SECRET2 is here something
else 2");
 
-    assertEquals("Field wasnt anonymized", "something else secret XXXXXXX / XXXXXXX is here
something else 2", jsonObj.remove("someField"));
+    assertEquals("Field wasnt anonymized", "something else secret ******* / ******* is here
something else 2", jsonObj.remove("someField"));
     assertTrue("jsonObj is not empty", jsonObj.isEmpty());
   }
 
@@ -55,7 +55,7 @@ public class MapperAnonymizeTest {
 
     MapAnonymizeDescriptorImpl mapAnonymizeDescriptorImpl = new MapAnonymizeDescriptorImpl();
     mapAnonymizeDescriptorImpl.setPattern("<hide> / <hide> is the secret");
-    mapAnonymizeDescriptorImpl.setHideChar('*');
+    mapAnonymizeDescriptorImpl.setHideChar('X');
 
     MapperAnonymize mapperAnonymize = new MapperAnonymize();
     assertTrue("Could not initialize!", mapperAnonymize.init(null, "someField", null, mapAnonymizeDescriptorImpl));
@@ -63,7 +63,7 @@ public class MapperAnonymizeTest {
     Map<String, Object> jsonObj = new HashMap<>();
     mapperAnonymize.apply(jsonObj, "something else SECRET1 / SECRET2 is the secret something
else 2");
 
-    assertEquals("Field wasnt anonymized", "something else ******* / ******* is the secret
something else 2", jsonObj.remove("someField"));
+    assertEquals("Field wasnt anonymized", "something else XXXXXXX / XXXXXXX is the secret
something else 2", jsonObj.remove("someField"));
     assertTrue("jsonObj is not empty", jsonObj.isEmpty());
   }
 


Mime
View raw message