HIVE-16673 : Test for HIVE-16413 (Zoltan Haindrich via Thejas Nair)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/bda5e1e0 Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/bda5e1e0 Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/bda5e1e0 Branch: refs/heads/hive-14535 Commit: bda5e1e0c013d3184e99c296eafa43e20b3ca87f Parents: 1c30393 Author: Zoltan Haindrich <[email protected]> Authored: Wed May 24 12:00:06 2017 -0700 Committer: Thejas M Nair <[email protected]> Committed: Wed May 24 12:00:16 2017 -0700 ---------------------------------------------------------------------- itests/src/test/resources/testconfiguration.properties | 4 +++- ql/src/test/queries/clientnegative/ct_noperm_loc.q | 11 +++++++++++ ql/src/test/queries/clientnegative/ctas_noperm_loc.q | 11 +++++++++++ ql/src/test/results/clientnegative/ct_noperm_loc.q.out | 1 + ql/src/test/results/clientnegative/ctas_noperm_loc.q.out | 1 + 5 files changed, 27 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/bda5e1e0/itests/src/test/resources/testconfiguration.properties ---------------------------------------------------------------------- diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties index 8e99b85..47a13c9 100644 --- a/itests/src/test/resources/testconfiguration.properties +++ b/itests/src/test/resources/testconfiguration.properties @@ -780,7 +780,9 @@ minimr.query.negative.files=cluster_tasklog_retrieval.q,\ mapreduce_stack_trace_turnoff.q,\ minimr_broken_pipe.q,\ table_nonprintable_negative.q,\ - udf_local_resource.q + udf_local_resource.q,\ + ct_noperm_loc.q,\ + ctas_noperm_loc.q # tests are sorted use: perl -pe 's@\\\s*\n@ @g' testconfiguration.properties \ # | awk -F= '/spark.query.files/{print $2}' | perl -pe '[email protected] *, *@\n@g' \ http://git-wip-us.apache.org/repos/asf/hive/blob/bda5e1e0/ql/src/test/queries/clientnegative/ct_noperm_loc.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientnegative/ct_noperm_loc.q b/ql/src/test/queries/clientnegative/ct_noperm_loc.q new file mode 100644 index 0000000..9ccca56 --- /dev/null +++ b/ql/src/test/queries/clientnegative/ct_noperm_loc.q @@ -0,0 +1,11 @@ +set hive.test.authz.sstd.hs2.mode=true; +set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; +set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; +set hive.security.authorization.enabled=true; + +dfs ${system:test.dfs.mkdir} hdfs:///tmp/ct_noperm_loc; + +set user.name=user1; + +create table foo0(id int) location 'hdfs:///tmp/ct_noperm_loc_foo0'; +create table foo1 location 'hdfs:///tmp/ct_noperm_loc/foo1'; http://git-wip-us.apache.org/repos/asf/hive/blob/bda5e1e0/ql/src/test/queries/clientnegative/ctas_noperm_loc.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientnegative/ctas_noperm_loc.q b/ql/src/test/queries/clientnegative/ctas_noperm_loc.q new file mode 100644 index 0000000..9fc3141 --- /dev/null +++ b/ql/src/test/queries/clientnegative/ctas_noperm_loc.q @@ -0,0 +1,11 @@ +set hive.test.authz.sstd.hs2.mode=true; +set hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest; +set hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateConfigUserAuthenticator; +set hive.security.authorization.enabled=true; + +dfs ${system:test.dfs.mkdir} hdfs:///tmp/ctas_noperm_loc; + +set user.name=user1; + +create table foo0 location 'hdfs:///tmp/ctas_noperm_loc_foo0' as select 1 as c1; +create table foo1 location 'hdfs:///tmp/ctas_noperm_loc/foo1' as select 1 as c1; http://git-wip-us.apache.org/repos/asf/hive/blob/bda5e1e0/ql/src/test/results/clientnegative/ct_noperm_loc.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientnegative/ct_noperm_loc.q.out b/ql/src/test/results/clientnegative/ct_noperm_loc.q.out new file mode 100644 index 0000000..0b8182a --- /dev/null +++ b/ql/src/test/results/clientnegative/ct_noperm_loc.q.out @@ -0,0 +1 @@ +#### A masked pattern was here #### http://git-wip-us.apache.org/repos/asf/hive/blob/bda5e1e0/ql/src/test/results/clientnegative/ctas_noperm_loc.q.out ---------------------------------------------------------------------- diff --git a/ql/src/test/results/clientnegative/ctas_noperm_loc.q.out b/ql/src/test/results/clientnegative/ctas_noperm_loc.q.out new file mode 100644 index 0000000..0b8182a --- /dev/null +++ b/ql/src/test/results/clientnegative/ctas_noperm_loc.q.out @@ -0,0 +1 @@ +#### A masked pattern was here ####
