----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74522/#review225642 -----------------------------------------------------------
agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java Line 39 (original), 41 (patched) <https://reviews.apache.org/r/74522/#comment314110> Why is the expected result 'false'? As I understand, the scope is set to SELF, and therefore it should return match-type as SELF. Comparing SELF with NONE should return 'false' which is reversed as the excludes flag is set to true. Therefore, the final expected result should be 'true'. agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java Line 42 (original), 44 (patched) <https://reviews.apache.org/r/74522/#comment314111> Here, the matchType is NONE, and when compared with NONE, should return true. So, the expected result should be 'true'. - Abhay Kulkarni On July 25, 2023, 8:34 p.m., Madhan Neethiraj wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/74522/ > ----------------------------------------------------------- > > (Updated July 25, 2023, 8:34 p.m.) > > > Review request for ranger, Hayat Behlim, Abhay Kulkarni, Mehul Parikh, Monika > Kachhadiya, Ramesh Mani, Subhrat Chaudhary, and Velmurugan Periasamy. > > > Bugs: RANGER-4328 > https://issues.apache.org/jira/browse/RANGER-4328 > > > Repository: ranger > > > Description > ------- > > updated ResourceMatcher.isPrefixMatch() implementations to handle wildcards > correctly > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerAbstractResourceMatcher.java > cb8d46adf > > agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcher.java > 702cb272f > > agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerPathResourceMatcher.java > 3c1523c25 > > agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerResourceMatcher.java > c4ce30d36 > > agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerURLResourceMatcher.java > ce73b3006 > > agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/ResourceMatcher.java > ad0942fbe > > agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerAbstractResourceMatcherTest.java > 767795e81 > > agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerDefaultResourceMatcherTest.java > e00bc834d > > agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerPathResourceMatcherTest.java > ed02be674 > > agents-common/src/test/java/org/apache/ranger/plugin/resourcematcher/RangerURLResourceMatcherTest.java > 904cb61b2 > > > Diff: https://reviews.apache.org/r/74522/diff/4/ > > > Testing > ------- > > - updated unittests to include wildcards at the beginning and in the middle > of policy values > - verified that all unit tests pass successfully > > > Thanks, > > Madhan Neethiraj > >
