geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [20/50] [abbrv] incubator-geode git commit: GEODE-1571: rework SamplePostProcessor
Date Fri, 08 Jul 2016 15:51:40 GMT
GEODE-1571: rework SamplePostProcessor


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/07d0817a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/07d0817a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/07d0817a

Branch: refs/heads/develop
Commit: 07d0817aa4292de8ed6302147e510c56bb6bffff
Parents: 0345bab
Author: Jinmei Liao <jiliao@pivotal.io>
Authored: Tue Jun 28 10:31:41 2016 -0700
Committer: Jinmei Liao <jiliao@pivotal.io>
Committed: Tue Jun 28 12:14:08 2016 -0700

----------------------------------------------------------------------
 .../gemfire/security/templates/SamplePostProcessor.java        | 2 +-
 .../internal/security/GfshCommandsPostProcessorTest.java       | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/07d0817a/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SamplePostProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SamplePostProcessor.java
b/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SamplePostProcessor.java
index 1adfb9f..87a4e3c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SamplePostProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/security/templates/SamplePostProcessor.java
@@ -39,6 +39,6 @@ public class SamplePostProcessor implements PostProcessor{
                                    String regionPath,
                                    Object key,
                                    Object value) {
-    return MASK;
+    return principal.getName()+"/"+regionPath+"/"+key+"/"+value;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/07d0817a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsPostProcessorTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsPostProcessorTest.java
b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsPostProcessorTest.java
index 2cfd496..d651b9a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsPostProcessorTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GfshCommandsPostProcessorTest.java
@@ -61,10 +61,12 @@ public class GfshCommandsPostProcessorTest {
 
     // for get command, assert the return value is processed
     gfsh.executeCommand("get --region=region1 --key=key1");
-    assertTrue(gfsh.outputString.contains("Value       : ****"), gfsh.outputString);
+    assertTrue(gfsh.outputString.contains("data-user/region1/key1/value1"), gfsh.outputString);
 
     // for query command, assert the return values are processed
     gfsh.executeCommand("query --query=\"select * from /region1\"");
-    assertTrue(gfsh.outputString.contains("****\n****\n****"), gfsh.outputString);
+    assertTrue(gfsh.outputString.contains("data-user/null/null/value1"), gfsh.outputString);
+    assertTrue(gfsh.outputString.contains("data-user/null/null/value2"), gfsh.outputString);
+    assertTrue(gfsh.outputString.contains("data-user/null/null/value3"), gfsh.outputString);
   }
 }


Mime
View raw message