You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by da...@apache.org on 2014/02/12 23:40:11 UTC

svn commit: r1567782 - in /hive/trunk/hcatalog/src/test/e2e/templeton: README.txt build.xml tests/jobstatus.conf

Author: daijy
Date: Wed Feb 12 22:40:11 2014
New Revision: 1567782

URL: http://svn.apache.org/r1567782
Log:
HIVE-6233: JOBS testsuite in WebHCat E2E tests does not work correctly in secure mode ( Deepesh Khandelwal via Daniel Dai )

Modified:
    hive/trunk/hcatalog/src/test/e2e/templeton/README.txt
    hive/trunk/hcatalog/src/test/e2e/templeton/build.xml
    hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf

Modified: hive/trunk/hcatalog/src/test/e2e/templeton/README.txt
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/src/test/e2e/templeton/README.txt?rev=1567782&r1=1567781&r2=1567782&view=diff
==============================================================================
--- hive/trunk/hcatalog/src/test/e2e/templeton/README.txt (original)
+++ hive/trunk/hcatalog/src/test/e2e/templeton/README.txt Wed Feb 12 22:40:11 2014
@@ -104,7 +104,6 @@ Running the tests
 Use the following command to run tests -
 
 ant test -Dinpdir.hdfs=<location of inpdir on hdfs>  -Dtest.user.name=<user the tests should run as> \
- -Dtest.other.user.name=<another user who can launch job> \
  -Dsecure.mode=<yes/no>   -Dharness.webhdfs.url=<webhdfs url upto port num>  -Dharness.templeton.url=<templeton url upto port num> 
 
 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 
 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=<keytab files 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=<keytab files dir> 
   -Dsecure.mode=<yes/no>  -Dtest.group.name=<common group> -Dinpdir.hdfs=<location of inpdir on hdfs>  
   -Dtest.user.name=<user 1 belonging to common group> -Dtest.group.user.name=<user 2 belonging to common group>  
   -Dtest.other.user.name=<user 3 who does not belong to common group> 

Modified: hive/trunk/hcatalog/src/test/e2e/templeton/build.xml
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/src/test/e2e/templeton/build.xml?rev=1567782&r1=1567781&r2=1567782&view=diff
==============================================================================
--- hive/trunk/hcatalog/src/test/e2e/templeton/build.xml (original)
+++ hive/trunk/hcatalog/src/test/e2e/templeton/build.xml Wed Feb 12 22:40:11 2014
@@ -106,7 +106,6 @@
             <env key="WEBHDFS_URL" value="${harness.webhdfs.url}"/>
             <env key="TEMPLETON_URL" value="${harness.templeton.url}"/>
             <env key="USER_NAME" value="${test.user.name}"/>
-            <env key="OTHER_USER_NAME" value="${test.other.user.name}"/>
             <env key="HARNESS_CONF" value="${basedir}/conf/default.conf"/>
             <env key="SECURE_MODE" value="${secure.mode}"/>
             <env key="HADOOP_VERSION" value="${hadoopversion}"/>
@@ -114,13 +113,12 @@
             <arg value="${basedir}/tests/serverstatus.conf"/>
             <arg value="${basedir}/tests/jobsubmission_streaming.conf"/>
             <arg value="${basedir}/tests/ddl.conf"/>
-            <arg value="${basedir}/tests/jobstatus.conf"/>
             <arg value="${basedir}/tests/jobsubmission.conf"/>
             <arg value="${basedir}/tests/jobsubmission2.conf"/>
         </exec>
     </target>
 
-    <target name="test-hcat-authorization" depends="property-check, init-test">
+    <target name="test-multi-users" depends="property-check, init-test">
         <!-- fork (parallelization) factors for e2e tests execution.
              Defaults are 1, which means *no* parellelization: -->
         <property name="fork.factor.group" value="1"/>
@@ -149,6 +147,7 @@
             <env key="KEYTAB_DIR" value="${keytab.dir}"/>
             <arg line="${tests.to.run}"/>
             <arg value="${basedir}/tests/hcatperms.conf"/>
+            <arg value="${basedir}/tests/jobstatus.conf"/>
         </exec>
     </target>
     <target name="test-doas" depends="property-check, init-test" description="See README.txt for instructions">

Modified: hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf?rev=1567782&r1=1567781&r2=1567782&view=diff
==============================================================================
--- hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf (original)
+++ hive/trunk/hcatalog/src/test/e2e/templeton/tests/jobstatus.conf Wed Feb 12 22:40:11 2014
@@ -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_.*',