diff --git a/hcatalog/src/test/e2e/templeton/README.txt b/hcatalog/src/test/e2e/templeton/README.txt index 00ea693..a3a6822 100644 --- a/hcatalog/src/test/e2e/templeton/README.txt +++ b/hcatalog/src/test/e2e/templeton/README.txt @@ -104,7 +104,6 @@ Running the tests Use the following command to run tests - ant test -Dinpdir.hdfs= -Dtest.user.name= \ - -Dtest.other.user.name= \ -Dsecure.mode= -Dharness.webhdfs.url= -Dharness.templeton.url= If you want to run specific test group you can specify the group, for example: -Dtests.to.run='-t TestHive' @@ -115,11 +114,10 @@ For example, tests/ddl.conf has several groups such as 'name' => 'REST_DDL_TABLE If you are running with Hadoop 2, please use the flag: -Dhadoopversion=23 -Running the hcat authorization tests ------------------------------------- -Hcat authorization tests run commands as different users to test if authorization is done right. - -ant test-hcat-authorization -Dkeytab.dir= +Running the multi users tests +----------------------------- +Multi user tests comprise of Hcat authorization tests and job status tests which run commands as different users. +ant test-multi-users -Dkeytab.dir= -Dsecure.mode= -Dtest.group.name= -Dinpdir.hdfs= -Dtest.user.name= -Dtest.group.user.name= -Dtest.other.user.name= diff --git a/hcatalog/src/test/e2e/templeton/build.xml b/hcatalog/src/test/e2e/templeton/build.xml index 1acb417..17cfd67 100644 --- a/hcatalog/src/test/e2e/templeton/build.xml +++ b/hcatalog/src/test/e2e/templeton/build.xml @@ -106,7 +106,6 @@ - @@ -114,13 +113,12 @@ - - + @@ -149,6 +147,7 @@ + diff --git a/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf b/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf index 9fddea2..078eae2 100644 --- a/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf +++ b/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf @@ -44,6 +44,7 @@ $cfg = 'num' => 1, 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/pig', + 'user_name' => ':UNAME_OTHER:', 'post_options' => ['user.name=:UNAME_OTHER:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/loadstore.pig', ], 'json_field_substr_match' => { 'id' => '\d+'}, #results @@ -57,6 +58,7 @@ $cfg = 'num' => 2, 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/pig', + 'user_name' => ':UNAME:', 'post_options' => ['user.name=:UNAME:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/loadstore.pig', ], 'json_field_substr_match' => { 'id' => '\d+'}, #results @@ -70,6 +72,7 @@ $cfg = 'num' => 3, 'method' => 'POST', 'url' => ':TEMPLETON_URL:/templeton/v1/pig', + 'user_name' => ':UNAME_OTHER:', 'post_options' => ['user.name=:UNAME_OTHER:', 'arg=-p', 'arg=INPDIR=:INPDIR_HDFS:','arg=-p', 'arg=OUTDIR=:OUTDIR:', 'file=:INPDIR_HDFS:/loadstore.pig', ], 'json_field_substr_match' => { 'id' => '\d+'}, #results @@ -85,6 +88,7 @@ $cfg = 'depends_on' => 'JOBS_1,JOBS_2,JOBS_3', 'method' => 'GET', 'url' => ':TEMPLETON_URL:/templeton/v1/jobs?user.name=:UNAME_OTHER:&showall=true&fields=*', + 'user_name' => ':UNAME_OTHER:', 'format_header' => 'Content-Type: application/json', 'filter_job_names' => ['TempletonControllerJob', 'PigLatin:loadstore.pig'], 'json_path' => {'$[-1:].detail.status.username' => ':UNAME_OTHER:', '$[-2:].detail.status.username' => ':UNAME_OTHER:', '$[-3:].detail.status.username' => ':UNAME:', @@ -97,6 +101,7 @@ $cfg = 'depends_on' => 'JOBS_1,JOBS_2,JOBS_3', 'method' => 'GET', 'url' => ':TEMPLETON_URL:/templeton/v1/jobs?user.name=:UNAME_OTHER:&fields=*', + 'user_name' => ':UNAME_OTHER:', 'format_header' => 'Content-Type: application/json', 'filter_job_names' => ['TempletonControllerJob', 'PigLatin:loadstore.pig'], 'json_path' => {'$[-1:].detail.status.username' => ':UNAME_OTHER:', '$[-2:].detail.status.username' => ':UNAME_OTHER:', '$[-3:].detail.status.username' => ':UNAME_OTHER:', @@ -109,6 +114,7 @@ $cfg = 'depends_on' => 'JOBS_1,JOBS_2,JOBS_3', 'method' => 'GET', 'url' => ':TEMPLETON_URL:/templeton/v1/jobs?user.name=:UNAME_OTHER:', + 'user_name' => ':UNAME_OTHER:', 'format_header' => 'Content-Type: application/json', 'json_path' => {'$[-1:].id' => 'job_.*', '$[-1:].detail' => '^$'}, 'status_code' => 200, @@ -119,6 +125,7 @@ $cfg = 'depends_on' => 'JOBS_1,JOBS_2,JOBS_3', 'method' => 'GET', 'url' => ':TEMPLETON_URL:/templeton/v1/jobs?user.name=:UNAME_OTHER:&fields=*', + 'user_name' => ':UNAME_OTHER:', 'format_header' => 'Content-Type: application/json', 'filter_job_names' => ['TempletonControllerJob', 'PigLatin:loadstore.pig'], 'json_path' => {'$[-1:].id' => 'job_.*', @@ -150,6 +157,7 @@ $cfg = 'depends_on' => 'JOBS_1,JOBS_2,JOBS_3', 'method' => 'GET', 'url' => ':TEMPLETON_URL:/templeton/v1/queue?user.name=:UNAME_OTHER:', + 'user_name' => ':UNAME_OTHER:', 'format_header' => 'Content-Type: application/json', 'json_path' => {'$[-1:]' => 'job_.*'}, 'status_code' => 200, @@ -161,6 +169,7 @@ $cfg = 'depends_on' => 'JOBS_1,JOBS_2,JOBS_3', 'method' => 'GET', 'url' => ':TEMPLETON_URL:/templeton/v1/jobs?user.name=:UNAME_OTHER:&fields=*&numrecords=2&jobid=job_0', + 'user_name' => ':UNAME_OTHER:', 'format_header' => 'Content-Type: application/json', 'json_path' => {'$[-1:].id' => 'job_.*', '$[-1:].detail.status.jobId' => 'job_.*',