Skip to content

Conversation

@mneethiraj
Copy link
Contributor

What changes were proposed in this pull request?

  • updated unit tests in TestPolicyACLs to validate policy ID returned in calls to RangerPolicyEngine.getResourceACLs().
  • updated test input files for readability

How was this patch tested?

All unit tests complete successfully.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances the unit test suite for RangerPolicyEngine.getResourceACLs() by adding validation for policy IDs returned in ACL results, improving test data readability, and refining comparison logic for AccessResult objects.

Key changes:

  • Updated test JSON files to include expected policy IDs in ACL results
  • Added default constructors for DataMaskResult and RowFilterResult to support deserialization
  • Enhanced AccessResult.equals() to compare policy IDs alongside result and finality
  • Initialized test data structures to avoid null values in test assertions

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test_aclprovider_resource_hierarchy_tags.json Reformatted for readability and added policy ID validation to all ACL test cases
test_aclprovider_mask_filter.json Reformatted and removed unnecessary empty arrays from test expectations
test_aclprovider_hdfs.json Reformatted and added policy ID validation for group permissions
test_aclprovider_default.json Reformatted and added comprehensive policy ID validation across all test scenarios
test_gds_policy_hive_row_filter.json Added policy ID validation to all user ACL assertions
test_gds_policy_hive_data_mask.json Added policy ID validation and removed unused userGroups fields from test requests
test_gds_policy_hive_access.json Added policy ID validation to ACL test cases
test_base_plugin_hive.json Updated expected policy IDs to match actual policy evaluation results
TestPolicyACLs.java Initialized test data structures with empty collections to prevent null pointer issues
RangerResourceACLs.java Enhanced AccessResult comparison to include policy ID; added default constructors for test data deserialization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant