You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sentry.apache.org by Sravya Tirukkovalur <sr...@cloudera.com> on 2013/10/01 00:13:13 UTC

Re: Review Request 14244: Normalize the user:group mapping for end to end tests


> On Sept. 30, 2013, 9:51 p.m., Shreepadma Venugopalan wrote:
> > sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithHiveServer.java, line 45
> > <https://reviews.apache.org/r/14244/diff/4/?file=357113#file357113line45>
> >
> >     Perhaps create a set of constants and use them in AbstractTestWithHiveServer and getStaticUserMappings() so that they are not repeated?

The static mapping is used in just one place, that is in PolicyFile. Unless, the user-group mapping is explicitly set in the test it uses the static mapping of PolicyFile. And the constants are declared in AbstractTestWithHiveServer and AbstractTestWithStaticConfiguration as these are the classes which tests inherit from.


- Sravya


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14244/#review26519
-----------------------------------------------------------


On Sept. 25, 2013, 7:10 p.m., Sravya Tirukkovalur wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14244/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2013, 7:10 p.m.)
> 
> 
> Review request for sentry, Brock Noland, Prasad Mujumdar, and Shreepadma Venugopalan.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> * All the tests are changed to use the below static user:group mapping (except TestUserManagement)
> admin1 = admin
> user1_1 = user_group1
> user1_2 = user_group1
> user2_1 = user_group2
> user3_1 = user_group3
> user4_1 = user_group4
> 
> * By default tests would use above static mapping.
> * New mappings can be added in the future when needed.
> * If static mapping is not feasible for a particular test case, on the fly user:mapping can be used for just this test case.
> * Test cases in TestUserManagement change the mapping per test, hence this test case is using per test mapping. But we can explore if this can also be using a static mapping with a follow up Jira.
> * For per DB policy files, as [users] section should not be used, policyFile.setUserSection(false) can be used.
> 
> 
> Diffs
> -----
> 
>   sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/PolicyFile.java fafe79b 
>   sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestPolicyParsingNegative.java 7285806 
>   sentry-provider/sentry-provider-file/src/test/java/org/apache/sentry/provider/file/TestSimplePolicyEngineDFS.java 656a0fa 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithHiveServer.java 25c64c7 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/AbstractTestWithStaticConfiguration.java e56eb92 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestCrossDbOps.java 45854e9 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestEndToEnd.java 8a32e5f 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestExportImportPrivileges.java c2403f8 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestMetadataObjectRetrieval.java a16db9b 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestMetadataPermissions.java cddd1d7 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestMovingToProduction.java ae3105c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPerDBConfiguration.java 17f4de1 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPerDatabasePolicyFile.java a89988a 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegeAtTransform.java 0b71c87 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtDatabaseScope.java f7d701c 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtFunctionScope.java 9bc0dcd 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestPrivilegesAtTableScope.java bf30abf 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestRuntimeMetadataRetrieval.java 4b0fe8e 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestSandboxOps.java 63778a7 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestSentryOnFailureHookLoading.java 4cfbbaa 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestServerConfiguration.java d02a193 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUriPermissions.java aae68e5 
>   sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUserManagement.java a7bb393 
> 
> Diff: https://reviews.apache.org/r/14244/diff/
> 
> 
> Testing
> -------
> 
> All tests pass
> 
> 
> Thanks,
> 
> Sravya Tirukkovalur
> 
>