hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From the...@apache.org
Subject svn commit: r1629979 - in /hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton: build.xml drivers/TestDriverCurl.pm
Date Tue, 07 Oct 2014 20:46:23 GMT
Author: thejas
Date: Tue Oct  7 20:46:22 2014
New Revision: 1629979

URL: http://svn.apache.org/r1629979
Log:
HIVE-8360 : Add cross cluster support for webhcat E2E tests (Aswathy Chellammal Sreekumar
via Thejas Nair)

Modified:
    hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/build.xml
    hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm

Modified: hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/build.xml
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/build.xml?rev=1629979&r1=1629978&r2=1629979&view=diff
==============================================================================
--- hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/build.xml (original)
+++ hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/build.xml Tue Oct  7 20:46:22
2014
@@ -111,6 +111,7 @@
             <env key="USER_NAME" value="${test.user.name}"/>
             <env key="HARNESS_CONF" value="${basedir}/conf/default.conf"/>
             <env key="SECURE_MODE" value="${secure.mode}"/>
+            <env key="USER_REALM" value="${user.realm}"/>
             <env key="HADOOP_VERSION" value="${hadoopversion}"/>
             <arg value="./test_harness.pl"/>
             <arg line="${tests.to.run}"/>
@@ -148,6 +149,7 @@
             <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="USER_REALM" value="${user.realm}"/>
             <env key="KEYTAB_DIR" value="${keytab.dir}"/>
             <arg value="./test_harness.pl"/>
             <arg line="${tests.to.run}"/>
@@ -186,7 +188,9 @@
             <env key="USER_NAME" value="${test.user.name}"/>
             <env key="DOAS_USER" value="${doas.user}"/>
             <env key="HARNESS_CONF" value="${basedir}/conf/default.conf"/>
+            <env key="USER_REALM" value="${user.realm}"/>
             <env key="SECURE_MODE" value="${secure.mode}"/>
+            <env key="USER_REALM" value="${user.realm}"/>
             <arg value="./test_harness.pl"/>
             <arg line="${tests.to.run}"/>
             <arg value="${basedir}/tests/doas.conf"/>

Modified: hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm?rev=1629979&r1=1629978&r2=1629979&view=diff
==============================================================================
--- hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm (original)
+++ hive/branches/branch-0.14/hcatalog/src/test/e2e/templeton/drivers/TestDriverCurl.pm Tue
Oct  7 20:46:22 2014
@@ -193,6 +193,7 @@ sub globalSetup
     $globalHash->{'db_password'} = $ENV{'DB_PASSWORD'};
 
     $globalHash->{'is_secure_mode'} = $ENV{'SECURE_MODE'};
+    $globalHash->{'user_realm'} = $ENV{'USER_REALM'};
 
     # add libexec location to the path
     if (defined($ENV{'PATH'})) {
@@ -491,7 +492,14 @@ sub execCurlCmd(){
       } elsif(scalar @files > 1){
         die "More than one keytab file found for user $user_name in $keytab_dir";
       }
-      my @cmd = ('kinit', '-k', '-t', $files[0], $user_name);
+      my @cmd = ();
+      if (defined $testCmd->{'user_realm'}){
+          my $user_name_with_realm_name = $user_name.'@'.$testCmd->{'user_realm'};
+          @cmd = ('kinit', '-k', '-t', $files[0], $user_name_with_realm_name);
+      }
+      else{
+          @cmd = ('kinit', '-k', '-t', $files[0], $user_name);
+      }
       print $log "Command  @cmd";
       IPC::Run::run(\@cmd, \undef, $log, $log) or 
           die "Could not kinit as $user_name using " .  $files[0] . " $ERRNO";



Mime
View raw message