ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [27/29] AMBARI-7407 Move service configs to /etc/ for versioned RPM's (dsen)
Date Fri, 19 Sep 2014 17:19:35 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
index 13f3049..58f3759 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py
@@ -157,7 +157,7 @@ class TestFlumeHandler(RMFTestCase):
 
   def assert_configure_default(self):
 
-    self.assertResourceCalled('Directory', '/etc/flume/conf')
+    self.assertResourceCalled('Directory', '/etc/flume/conf', recursive=True)
 
     self.assertResourceCalled('Directory', '/var/log/flume', owner = 'flume')
 
@@ -180,7 +180,7 @@ class TestFlumeHandler(RMFTestCase):
 
   def assert_configure_many(self):
 
-    self.assertResourceCalled('Directory', '/etc/flume/conf')
+    self.assertResourceCalled('Directory', '/etc/flume/conf', recursive=True)
 
     self.assertResourceCalled('Directory', '/var/log/flume', owner = 'flume')
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
index 01f96c7..38f04ab 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_service_check.py
@@ -56,7 +56,7 @@ class TestServiceCheck(RMFTestCase):
     self.assertResourceCalled('ExecuteHadoop', 'fs -mkdir /tmp',
         conf_dir = '/etc/hadoop/conf',
         logoutput = True,
-        not_if = 'su - ambari-qa -c \'hadoop --config /etc/hadoop/conf fs -test -e /tmp\'',
+        not_if = 'su - ambari-qa -c \'/usr/bin/hadoop --config /etc/hadoop/conf fs -test
-e /tmp\'',
         try_sleep = 3,
         tries = 5,
         bin_dir = '/usr/bin',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
index f1d7ed9..fb4f9c9 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hcat_client.py
@@ -31,10 +31,12 @@ class TestHcatClient(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hive/conf',
                               owner = 'hcat',
                               group = 'hadoop',
+                              recursive = True,
     )
     self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
       owner = 'hcat',
       group = 'hadoop',
+      recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/run/webhcat',
       owner = 'hcat',
@@ -64,10 +66,12 @@ class TestHcatClient(RMFTestCase):
                          config_file="secured.json"
     )
     self.assertResourceCalled('Directory', '/etc/hive/conf',
+                              recursive = True,
                               owner = 'hcat',
                               group = 'hadoop',
     )
     self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
+      recursive = True,
       owner = 'hcat',
       group = 'hadoop',
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
index 204e384..1101230 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_metastore.py
@@ -41,7 +41,7 @@ class TestHiveMetastore(RMFTestCase):
     self.assert_configure_default()
     self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr JAVA_HOME=/usr/jdk64/jdk1.7.0_45
/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid
/etc/hive/conf.server /var/log/hive',
         not_if = 'ls /var/run/hive/hive.pid >/dev/null 2>&1 && ps `cat
/var/run/hive/hive.pid` >/dev/null 2>&1',
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin",
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin",
                        'HADOOP_HOME' : '/usr'},
         user = 'hive',
     )
@@ -81,10 +81,9 @@ class TestHiveMetastore(RMFTestCase):
     )
 
     self.assert_configure_secured()
-    self.maxDiff = None
     self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr JAVA_HOME=/usr/jdk64/jdk1.7.0_45
/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid
/etc/hive/conf.server /var/log/hive',
         not_if = 'ls /var/run/hive/hive.pid >/dev/null 2>&1 && ps `cat
/var/run/hive/hive.pid` >/dev/null 2>&1',
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin",
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin",
                        'HADOOP_HOME' : '/usr'},
         user = 'hive',
     )
@@ -202,7 +201,7 @@ class TestHiveMetastore(RMFTestCase):
     )
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar
/usr/lib/hive/lib//mysql-connector-java.jar',
         creates = '/usr/lib/hive/lib//mysql-connector-java.jar',
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin"},
         path = ['/bin', '/usr/bin/'],
         not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar',
     )
@@ -329,7 +328,7 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar
/usr/lib/hive/lib//mysql-connector-java.jar',
         creates = '/usr/lib/hive/lib//mysql-connector-java.jar',
         path = ['/bin', '/usr/bin/'],
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin"},
         not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar',
     )
     self.assertResourceCalled('Execute', '/bin/sh -c \'cd /usr/lib/ambari-agent/ &&
curl -kf -x "" --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar
-o DBConnectionVerification.jar\'',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
index 3c5ec85..a72f3ea 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_server.py
@@ -85,6 +85,7 @@ class TestHiveServer(RMFTestCase):
                               dest_dir='/apps/tez/',
                               kinnit_if_needed='',
                               hadoop_conf_dir='/etc/hadoop/conf',
+                              hadoop_bin_dir='/usr/bin',
                               hdfs_user='hdfs',
                               dest_file=None
     )
@@ -94,13 +95,14 @@ class TestHiveServer(RMFTestCase):
                               owner='tez',
                               dest_dir='/apps/tez/lib/',
                               kinnit_if_needed='',
+                              hadoop_bin_dir='/usr/bin',
                               hadoop_conf_dir='/etc/hadoop/conf',
                               hdfs_user='hdfs'
     )
 
     self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_hiveserver2_script
/var/log/hive/hive-server2.out /var/log/hive/hive-server2.log /var/run/hive/hive-server.pid
/etc/hive/conf.server /var/log/hive',
                               not_if = 'ls /var/run/hive/hive-server.pid >/dev/null 2>&1
&& ps `cat /var/run/hive/hive-server.pid` >/dev/null 2>&1',
-                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin",
+                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"
+ os.pathsep + "/usr/bin",
                                              'HADOOP_HOME' : '/usr'},
                               user = 'hive'
     )
@@ -153,8 +155,8 @@ class TestHiveServer(RMFTestCase):
     self.assert_configure_secured()
     self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/start_hiveserver2_script
/var/log/hive/hive-server2.out /var/log/hive/hive-server2.log /var/run/hive/hive-server.pid
/etc/hive/conf.server /var/log/hive',
                               not_if = 'ls /var/run/hive/hive-server.pid >/dev/null 2>&1
&& ps `cat /var/run/hive/hive-server.pid` >/dev/null 2>&1',
-                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin",
-                                             'HADOOP_HOME' : '/usr'},
+                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"
+ os.pathsep + "/usr/bin",
+                                             'HADOOP_HOME': '/usr'},
                               user = 'hive'
     )
 
@@ -309,7 +311,7 @@ class TestHiveServer(RMFTestCase):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar
/usr/lib/hive/lib//mysql-connector-java.jar',
         creates = '/usr/lib/hive/lib//mysql-connector-java.jar',
         path = ['/bin', '/usr/bin/'],
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin"},
         not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar',
     )
     self.assertResourceCalled('Execute', '/bin/sh -c \'cd /usr/lib/ambari-agent/ &&
curl -kf -x "" --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar
-o DBConnectionVerification.jar\'',
@@ -466,7 +468,7 @@ class TestHiveServer(RMFTestCase):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar
/usr/lib/hive/lib//mysql-connector-java.jar',
         creates = '/usr/lib/hive/lib//mysql-connector-java.jar',
         path = ['/bin', '/usr/bin/'],
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin"},
         not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar',
     )
     self.assertResourceCalled('Execute', '/bin/sh -c \'cd /usr/lib/ambari-agent/ &&
curl -kf -x "" --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar
-o DBConnectionVerification.jar\'',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
index 79ac487..01da905 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
@@ -40,10 +40,9 @@ class TestServiceCheck(RMFTestCase):
     )
     self.assertResourceCalled('Execute', 'env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/hcatSmoke.sh
hcatsmoke prepare',
                         logoutput = True,
-                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin'],
+                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin', os.environ['PATH']
+ os.pathsep + "/usr/lib/hive/bin" + os.pathsep + "/usr/bin"],
                         tries = 3,
                         user = 'ambari-qa',
-                        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
                         try_sleep = 5,
     )
     self.assertResourceCalled('ExecuteHadoop', 'fs -test -e /apps/hive/warehouse/hcatsmoke',
@@ -52,15 +51,14 @@ class TestServiceCheck(RMFTestCase):
                         conf_dir = '/etc/hadoop/conf',
                         keytab=UnknownConfigurationMock(),
                         kinit_path_local='/usr/bin/kinit',
-                        bin_dir = '/usr/lib/hive/bin',
+                        bin_dir = os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" +
os.pathsep + "/usr/bin",
                         security_enabled=False
     )
     self.assertResourceCalled('Execute', ' /tmp/hcatSmoke.sh hcatsmoke cleanup',
                         logoutput = True,
-                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin'],
+                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin', os.environ['PATH']
+ os.pathsep + "/usr/lib/hive/bin" + os.pathsep + "/usr/bin"],
                         tries = 3,
                         user = 'ambari-qa',
-                        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
                         try_sleep = 5,
     )
     self.assertResourceCalled('File', '/tmp/templetonSmoke.sh',
@@ -87,12 +85,12 @@ class TestServiceCheck(RMFTestCase):
                         content = StaticFile('hcatSmoke.sh'),
                         mode = 0755,
     )
+    self.maxDiff = None
     self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab
ambari-qa; env JAVA_HOME=/usr/jdk64/jdk1.7.0_45 /tmp/hcatSmoke.sh hcatsmoke prepare',
                         logoutput = True,
-                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin'],
+                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin', os.environ['PATH']
+ os.pathsep + "/usr/lib/hive/bin" + os.pathsep + "/usr/bin"],
                         tries = 3,
                         user = 'ambari-qa',
-                        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
                         try_sleep = 5,
     )
     self.assertResourceCalled('ExecuteHadoop', 'fs -test -e /apps/hive/warehouse/hcatsmoke',
@@ -102,15 +100,14 @@ class TestServiceCheck(RMFTestCase):
                         keytab='/etc/security/keytabs/hdfs.headless.keytab',
                         kinit_path_local='/usr/bin/kinit',
                         security_enabled=True,
-                        bin_dir = '/usr/lib/hive/bin',
+                        bin_dir = os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" +
os.pathsep + "/usr/bin",
                         principal='hdfs'
     )
     self.assertResourceCalled('Execute', '/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab
ambari-qa;  /tmp/hcatSmoke.sh hcatsmoke cleanup',
                         logoutput = True,
-                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin'],
+                        path = ['/usr/sbin', '/usr/local/nin', '/bin', '/usr/bin', os.environ['PATH']
+ os.pathsep + "/usr/lib/hive/bin" + os.pathsep + "/usr/bin"],
                         tries = 3,
                         user = 'ambari-qa',
-                        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
                         try_sleep = 5,
     )
     self.assertResourceCalled('File', '/tmp/templetonSmoke.sh',

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
index 71839cb..31588b8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_webhcat_server.py
@@ -142,6 +142,7 @@ class TestWebHCatServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
                               owner = 'hcat',
                               group = 'hadoop',
+                              recursive = True,
                               )
     self.assertResourceCalled('XmlConfig', 'webhcat-site.xml',
                               owner = 'hcat',
@@ -161,6 +162,7 @@ class TestWebHCatServer(RMFTestCase):
                               dest_dir='/apps/webhcat',
                               kinnit_if_needed='',
                               hadoop_conf_dir='/etc/hadoop/conf',
+                              hadoop_bin_dir='/usr/bin',
                               hdfs_user='hdfs'
     )
     self.assertResourceCalled('CopyFromLocal', '/usr/share/HDP-webhcat/pig.tar.gz',
@@ -169,6 +171,7 @@ class TestWebHCatServer(RMFTestCase):
                               dest_dir='/apps/webhcat',
                               kinnit_if_needed='',
                               hadoop_conf_dir='/etc/hadoop/conf',
+                              hadoop_bin_dir='/usr/bin',
                               hdfs_user='hdfs'
     )
     self.assertResourceCalled('CopyFromLocal', '/usr/share/HDP-webhcat/hive.tar.gz',
@@ -176,6 +179,7 @@ class TestWebHCatServer(RMFTestCase):
                               mode=0755,
                               dest_dir='/apps/webhcat',
                               kinnit_if_needed='',
+                              hadoop_bin_dir='/usr/bin',
                               hadoop_conf_dir='/etc/hadoop/conf',
                               hdfs_user='hdfs'
     )
@@ -227,6 +231,7 @@ class TestWebHCatServer(RMFTestCase):
     self.assertResourceCalled('Directory', '/etc/hcatalog/conf',
                               owner = 'hcat',
                               group = 'hadoop',
+                              recursive = True,
                               )
     self.assertResourceCalled('XmlConfig', 'webhcat-site.xml',
                               owner = 'hcat',
@@ -250,6 +255,7 @@ class TestWebHCatServer(RMFTestCase):
                               dest_dir='/apps/webhcat',
                               kinnit_if_needed='/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab
hdfs;',
                               hadoop_conf_dir='/etc/hadoop/conf',
+                              hadoop_bin_dir='/usr/bin',
                               hdfs_user='hdfs'
     )
     self.assertResourceCalled('CopyFromLocal', '/usr/share/HDP-webhcat/pig.tar.gz',
@@ -258,6 +264,7 @@ class TestWebHCatServer(RMFTestCase):
                               dest_dir='/apps/webhcat',
                               kinnit_if_needed='/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab
hdfs;',
                               hadoop_conf_dir='/etc/hadoop/conf',
+                              hadoop_bin_dir='/usr/bin',
                               hdfs_user='hdfs'
     )
     self.assertResourceCalled('CopyFromLocal', '/usr/share/HDP-webhcat/hive.tar.gz',
@@ -266,5 +273,6 @@ class TestWebHCatServer(RMFTestCase):
                               dest_dir='/apps/webhcat',
                               kinnit_if_needed='/usr/bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab
hdfs;',
                               hadoop_conf_dir='/etc/hadoop/conf',
+                              hadoop_bin_dir='/usr/bin',
                               hdfs_user='hdfs'
     )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
index 175fbb5..2874614 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/PIG/test_pig_client.py
@@ -30,6 +30,7 @@ class TestPigClient(RMFTestCase):
     )
 
     self.assertResourceCalled('Directory', '/etc/pig/conf',
+      recursive = True,
       owner = 'hdfs',
       group = 'hadoop'
     )
@@ -59,6 +60,7 @@ class TestPigClient(RMFTestCase):
     )
     
     self.assertResourceCalled('Directory', '/etc/pig/conf',
+      recursive = True,
       owner = 'hdfs',
       group = 'hadoop'
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
index 8233470..c089b6b 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_mapreduce2_service_check.py
@@ -38,11 +38,13 @@ class TestServiceCheck(RMFTestCase):
                       try_sleep = 5,
                       tries = 1,
                       user = 'ambari-qa',
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       conf_dir = '/etc/hadoop/conf',
     )
     self.assertResourceCalled('ExecuteHadoop', 'fs -put /etc/passwd /user/ambari-qa/mapredsmokeinput',
                       try_sleep = 5,
                       tries = 1,
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       user = 'ambari-qa',
                       conf_dir = '/etc/hadoop/conf',
     )
@@ -50,11 +52,13 @@ class TestServiceCheck(RMFTestCase):
                       logoutput = True,
                       try_sleep = 5,
                       tries = 1,
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       user = 'ambari-qa',
                       conf_dir = '/etc/hadoop/conf',
     )
     self.assertResourceCalled('ExecuteHadoop', 'fs -test -e /user/ambari-qa/mapredsmokeoutput',
                       user = 'ambari-qa',
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       conf_dir = '/etc/hadoop/conf',
     )
     self.assertNoMoreResources()
@@ -73,11 +77,13 @@ class TestServiceCheck(RMFTestCase):
                       try_sleep = 5,
                       tries = 1,
                       user = 'ambari-qa',
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       conf_dir = '/etc/hadoop/conf',
     )
     self.assertResourceCalled('ExecuteHadoop', 'fs -put /etc/passwd /user/ambari-qa/mapredsmokeinput',
                       try_sleep = 5,
                       tries = 1,
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       user = 'ambari-qa',
                       conf_dir = '/etc/hadoop/conf',
     )
@@ -85,11 +91,13 @@ class TestServiceCheck(RMFTestCase):
                       logoutput = True,
                       try_sleep = 5,
                       tries = 1,
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       user = 'ambari-qa',
                       conf_dir = '/etc/hadoop/conf',
     )
     self.assertResourceCalled('ExecuteHadoop', 'fs -test -e /user/ambari-qa/mapredsmokeoutput',
                       user = 'ambari-qa',
+                      bin_dir =  os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin",
                       conf_dir = '/etc/hadoop/conf',
     )
     self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
index 65ea0a5..604afe2 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_yarn_service_check.py
@@ -43,7 +43,7 @@ class TestServiceCheck(RMFTestCase):
                           try_sleep = 5,
     )
     self.assertResourceCalled('Execute', 'yarn --config /etc/hadoop/conf node -list',
-                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/bin"},
+                              path = [os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin"],
                               user = 'ambari-qa',
     )
     self.assertNoMoreResources()
@@ -66,7 +66,7 @@ class TestServiceCheck(RMFTestCase):
                           try_sleep = 5,
     )
     self.assertResourceCalled('Execute', 'yarn --config /etc/hadoop/conf node -list',
-                          environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/bin"},
+                              path = [os.environ['PATH'] + os.pathsep + "/usr/bin" + os.pathsep
+ "/usr/lib/hadoop-yarn/bin"],
                           user = 'ambari-qa',
     )
     self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/d7ed4316/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
index 47423ff..691c21a 100644
--- a/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
+++ b/ambari-server/src/test/python/stacks/2.1/HIVE/test_hive_metastore.py
@@ -41,7 +41,7 @@ class TestHiveMetastore(RMFTestCase):
     self.assert_configure_default()
     self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr JAVA_HOME=/usr/jdk64/jdk1.7.0_45
/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid
/etc/hive/conf.server /var/log/hive',
                               not_if = 'ls /var/run/hive/hive.pid >/dev/null 2>&1
&& ps `cat /var/run/hive/hive.pid` >/dev/null 2>&1',
-                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin",
+                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"
+ os.pathsep + "/usr/bin",
                                              'HADOOP_HOME' : '/usr'},
                               user = 'hive'
     )
@@ -85,7 +85,7 @@ class TestHiveMetastore(RMFTestCase):
     self.assert_configure_secured()
     self.assertResourceCalled('Execute', 'env HADOOP_HOME=/usr JAVA_HOME=/usr/jdk64/jdk1.7.0_45
/tmp/start_metastore_script /var/log/hive/hive.out /var/log/hive/hive.log /var/run/hive/hive.pid
/etc/hive/conf.server /var/log/hive',
                               not_if = 'ls /var/run/hive/hive.pid >/dev/null 2>&1
&& ps `cat /var/run/hive/hive.pid` >/dev/null 2>&1',
-                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin",
+                              environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"
+ os.pathsep + "/usr/bin",
                                              'HADOOP_HOME' : '/usr'},
                               user = 'hive'
     )
@@ -180,7 +180,7 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar
/usr/lib/hive/lib//mysql-connector-java.jar',
         creates = '/usr/lib/hive/lib//mysql-connector-java.jar',
         path = ['/bin', '/usr/bin/'],
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin"},
         not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar',
     )
     self.assertResourceCalled('Execute', '/bin/sh -c \'cd /usr/lib/ambari-agent/ &&
curl -kf -x "" --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar
-o DBConnectionVerification.jar\'',
@@ -285,7 +285,7 @@ class TestHiveMetastore(RMFTestCase):
     self.assertResourceCalled('Execute', 'hive mkdir -p /tmp/AMBARI-artifacts/ ; cp /usr/share/java/mysql-connector-java.jar
/usr/lib/hive/lib//mysql-connector-java.jar',
         creates = '/usr/lib/hive/lib//mysql-connector-java.jar',
         path = ['/bin', '/usr/bin/'],
-        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin"},
+        environment = {'PATH' : os.environ['PATH'] + os.pathsep + "/usr/lib/hive/bin" + os.pathsep
+ "/usr/bin"},
         not_if = 'test -f /usr/lib/hive/lib//mysql-connector-java.jar',
     )
     self.assertResourceCalled('Execute', '/bin/sh -c \'cd /usr/lib/ambari-agent/ &&
curl -kf -x "" --retry 5 http://c6401.ambari.apache.org:8080/resources/DBConnectionVerification.jar
-o DBConnectionVerification.jar\'',


Mime
View raw message