SENTRY-930: Improve TestDbDDLAuditLog for keep consistent with Hive metadata.(Dapeng Sun, reviewed by Colin Ma)
Project: http://git-wip-us.apache.org/repos/asf/incubator-sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-sentry/commit/b30711e8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-sentry/tree/b30711e8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-sentry/diff/b30711e8 Branch: refs/heads/hive_plugin_v2 Commit: b30711e89c730d0f69d95a8290cc851410b58bba Parents: a482ff9 Author: Sun Dapeng <[email protected]> Authored: Tue Oct 27 09:13:38 2015 +0800 Committer: Sun Dapeng <[email protected]> Committed: Tue Oct 27 09:13:38 2015 +0800 ---------------------------------------------------------------------- .../org/apache/sentry/tests/e2e/dbprovider/TestDbDDLAuditLog.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/b30711e8/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbDDLAuditLog.java ---------------------------------------------------------------------- diff --git a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbDDLAuditLog.java b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbDDLAuditLog.java index 8613034..3afd6b2 100644 --- a/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbDDLAuditLog.java +++ b/sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDbDDLAuditLog.java @@ -84,6 +84,9 @@ public class TestDbDDLAuditLog extends AbstractTestWithStaticConfiguration { fieldValueMap.put(Constants.LOG_FIELD_IP_ADDRESS, null); assertAuditLog(fieldValueMap); + statement.execute("create database " + dbName); + statement.execute("use " + dbName); + statement.execute("CREATE TABLE " + tableName + " (c1 string)"); statement.execute("GRANT ALL ON DATABASE " + dbName + " TO ROLE " + roleName); fieldValueMap.clear(); fieldValueMap.put(Constants.LOG_FIELD_OPERATION, Constants.OPERATION_GRANT_PRIVILEGE);
