ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [2/3] git commit: AMBARI-4609. Unit tests failing with pop from empty list error. (Vitaliy Semenyk via aonishuk)
Date Tue, 11 Feb 2014 17:41:48 GMT
AMBARI-4609. Unit tests failing with pop from empty list error.
(Vitaliy Semenyk via aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3cfc8308
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3cfc8308
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3cfc8308

Branch: refs/heads/trunk
Commit: 3cfc8308fef22193dfee00d1310dd1910aececc0
Parents: e7cf023
Author: Andrew Onischuk <aonishuk@hortonworks.com>
Authored: Tue Feb 11 09:19:40 2014 -0800
Committer: Andrew Onischuk <aonishuk@hortonworks.com>
Committed: Tue Feb 11 09:19:40 2014 -0800

----------------------------------------------------------------------
 .../test/python/stacks/1.3.2/PIG/test_pig_client.py | 16 ++++++++++------
 .../test/python/stacks/1.3.2/configs/default.json   |  3 +++
 .../test/python/stacks/1.3.2/configs/secured.json   |  3 +++
 .../test/python/stacks/2.0.6/PIG/test_pig_client.py | 16 +++++++++-------
 .../test/python/stacks/2.0.6/configs/default.json   |  3 +++
 .../test/python/stacks/2.0.6/configs/secured.json   |  3 +++
 6 files changed, 31 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc8308/ambari-server/src/test/python/stacks/1.3.2/PIG/test_pig_client.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/PIG/test_pig_client.py b/ambari-server/src/test/python/stacks/1.3.2/PIG/test_pig_client.py
index b290939..1856be6 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/PIG/test_pig_client.py
+++ b/ambari-server/src/test/python/stacks/1.3.2/PIG/test_pig_client.py
@@ -28,7 +28,6 @@ class TestPigClient(RMFTestCase):
                        command = "configure",
                        config_file="default.json"
     )
-    
     self.assertResourceCalled('Directory', '/etc/pig/conf',
       owner = 'hdfs',
       group = 'hadoop',
@@ -39,20 +38,23 @@ class TestPigClient(RMFTestCase):
     self.assertResourceCalled('TemplateConfig', '/etc/pig/conf/pig.properties',
       owner = 'hdfs',
     )
-    self.assertResourceCalled('File', '/etc/pig/conf/log4j.properties',
+    self.assertResourceCalled('PropertiesFile', 'log4j.properties',
       owner = 'hdfs',
       group = 'hadoop',
-      mode = 0644,
+      mode = 0664,
+      dir = '/etc/pig/conf',
+      properties = self.getConfig()['configurations']['pig-log4j'],
     )
     self.assertNoMoreResources()
 
+
+
   def test_configure_secured(self):
     self.executeScript("1.3.2/services/PIG/package/scripts/pig_client.py",
                        classname = "PigClient",
                        command = "configure",
                        config_file="secured.json"
     )
-    
     self.assertResourceCalled('Directory', '/etc/pig/conf',
       owner = 'hdfs',
       group = 'hadoop',
@@ -63,9 +65,11 @@ class TestPigClient(RMFTestCase):
     self.assertResourceCalled('TemplateConfig', '/etc/pig/conf/pig.properties',
       owner = 'hdfs',
     )
-    self.assertResourceCalled('File', '/etc/pig/conf/log4j.properties',
+    self.assertResourceCalled('PropertiesFile', 'log4j.properties',
       owner = 'hdfs',
       group = 'hadoop',
-      mode = 0644,
+      mode = 0664,
+      dir = '/etc/pig/conf',
+      properties = self.getConfig()['configurations']['pig-log4j'],
     )
     self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc8308/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/configs/default.json b/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
index 9e087b7..67cc4ac 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
+++ b/ambari-server/src/test/python/stacks/1.3.2/configs/default.json
@@ -367,6 +367,9 @@
         },
         "zookeeper-log4j": {
             "property1": "value1"
+        },
+        "pig-log4j": {
+            "property1": "value1"
         }
     }, 
     "configurationTags": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc8308/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json b/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
index a5ee2fd..e711ff2 100644
--- a/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/1.3.2/configs/secured.json
@@ -472,6 +472,9 @@
         },
         "zookeeper-log4j": {
             "property1": "value1"
+        },
+        "pig-log4j": {
+            "property1": "value1"
         }
     }, 
     "configurationTags": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc8308/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 12c08e1..0143e27 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
@@ -28,7 +28,6 @@ class TestPigClient(RMFTestCase):
                        command = "configure",
                        config_file="default.json"
     )
-
     self.assertResourceCalled('Directory', '/etc/pig/conf',
       owner = 'hdfs',
       group = 'hadoop',
@@ -39,20 +38,21 @@ class TestPigClient(RMFTestCase):
     self.assertResourceCalled('TemplateConfig', '/etc/pig/conf/pig.properties',
       owner = 'hdfs',
     )
-    self.assertResourceCalled('File', '/etc/pig/conf/log4j.properties',
+    self.assertResourceCalled('PropertiesFile', 'log4j.properties',
       owner = 'hdfs',
       group = 'hadoop',
-      mode = 0644,
+      mode = 0664,
+      dir = '/etc/pig/conf',
+      properties = self.getConfig()['configurations']['pig-log4j'],
     )
     self.assertNoMoreResources()
-
+    
   def test_configure_secured(self):
     self.executeScript("2.0.6/services/PIG/package/scripts/pig_client.py",
                        classname = "PigClient",
                        command = "configure",
                        config_file="secured.json"
     )
-    
     self.assertResourceCalled('Directory', '/etc/pig/conf',
       owner = 'hdfs',
       group = 'hadoop',
@@ -63,9 +63,11 @@ class TestPigClient(RMFTestCase):
     self.assertResourceCalled('TemplateConfig', '/etc/pig/conf/pig.properties',
       owner = 'hdfs',
     )
-    self.assertResourceCalled('File', '/etc/pig/conf/log4j.properties',
+    self.assertResourceCalled('PropertiesFile', 'log4j.properties',
       owner = 'hdfs',
       group = 'hadoop',
-      mode = 0644,
+      mode = 0664,
+      dir = '/etc/pig/conf',
+      properties = self.getConfig()['configurations']['pig-log4j'],
     )
     self.assertNoMoreResources()

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc8308/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
index c96a303..32717e1 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json
@@ -507,6 +507,9 @@
         },
         "zookeeper-log4j": {
             "property1": "value1"
+        },
+        "pig-log4j": {
+            "property1": "value1"
         }
     },
     "configurationTags": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc8308/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
index c4776bc..61a4830 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json
@@ -634,6 +634,9 @@
         },
         "zookeeper-log4j": {
             "property1": "value1"
+        },
+        "pig-log4j": {
+            "property1": "value1"
         }
     }, 
     "configurationTags": {


Mime
View raw message