Revert "AMBARI-22575. Broken Python Unit Tests in branch-2.6 (aonishuk)"

This reverts commit 51e26b86f8fef18f533a238f224d43d76a08bbaa.


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

Branch: refs/heads/branch-2.6
Commit: 83cbde7d75fbb9994b2c281ccae7f8b45f073225
Parents: 613dccb
Author: Siddharth Wagle <swa...@hortonworks.com>
Authored: Mon Dec 4 10:38:13 2017 -0800
Committer: Siddharth Wagle <swa...@hortonworks.com>
Committed: Mon Dec 4 10:38:13 2017 -0800

----------------------------------------------------------------------
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     | 152 +------------------
 .../stacks/2.2/configs/oozie-upgrade.json       |  39 +----
 2 files changed, 2 insertions(+), 189 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/83cbde7d/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py 
b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
index 09c4227..10a83d6 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/OOZIE/test_oozie_server.py
@@ -28,44 +28,6 @@ from resource_management.libraries import functions
 from resource_management.libraries.providers.hdfs_resource import WebHDFSUtil
 import tempfile
 
-REPOSITORY_FILE_DICT = {
-        "resolved": True, 
-        "repoVersion": "2.6.4.0-52", 
-        "repositories": [
-            {
-                "tags": [], 
-                "ambariManaged": True, 
-                "baseUrl": 
"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-52";,
 
-                "repoName": "HDP", 
-                "repoId": "HDP-2.6-repo-1", 
-                "applicableServices": []
-            }, 
-            {
-                "repoName": "HDP-GPL", 
-                "tags": [
-                    "GPL"
-                ], 
-                "ambariManaged": True, 
-                "baseUrl": 
"http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-52";,
 
-                "repoId": "HDP-2.6-GPL-repo-1"
-            }, 
-            {
-                "repoName": "HDP-UTILS", 
-                "tags": [], 
-                "ambariManaged": True, 
-                "baseUrl": 
"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6";, 
-                "repoId": "HDP-UTILS-1.1.0.22-repo-1"
-            }
-        ], 
-        "feature": {
-            "preInstalled": False, 
-            "scoped": True
-        }, 
-        "stackName": "HDP", 
-        "repoVersionId": 1, 
-        "repoFileName": "ambari-hdp-1"
-    }
-
 def format_package_name_side_effect(name):
   return name.replace("${stack_version}", "1_2_3_4")
 
@@ -1257,34 +1219,6 @@ class TestOozieServer(RMFTestCase):
       sudo = True )
 
     self.assertResourceCalled('Directory', 
'/usr/hdp/current/oozie-server/libext', mode = 0777)
-    
-    self.assertResourceCalled('Repository', 'HDP-2.6-repo-1',
-        append_to_file = False,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = [u'HDP', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-2.6-GPL-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = [u'HDP-GPL', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-UTILS-1.1.0.22-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6',
-        action = ['create'],
-        components = [u'HDP-UTILS', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
     self.assertResourceCalled('Package', ('lzo'), retry_count=5, 
retry_on_repo_unavailability= False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4'), retry_count = 
5, retry_on_repo_unavailability = False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4-native'), 
retry_count = 5, retry_on_repo_unavailability = False)
@@ -1326,7 +1260,6 @@ class TestOozieServer(RMFTestCase):
     version = '2.3.0.0-1234'
     json_content['commandParams']['version'] = version
     json_content['hostLevelParams']['stack_version'] = "2.3"
-    json_content['repositoryFile'] = REPOSITORY_FILE_DICT
 
     mocks_dict = {}
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
"/scripts/oozie_server.py",
@@ -1350,33 +1283,6 @@ class TestOozieServer(RMFTestCase):
 
     self.assertResourceCalled('Directory', 
'/usr/hdp/current/oozie-server/libext', mode = 0777)
 
-    self.assertResourceCalled('Repository', 'HDP-2.6-repo-1',
-        append_to_file = False,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = ['HDP', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-2.6-GPL-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = ['HDP-GPL', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-UTILS-1.1.0.22-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6',
-        action = ['create'],
-        components = ['HDP-UTILS', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
     self.assertResourceCalled('Package', ('lzo'), retry_count=5, 
retry_on_repo_unavailability= False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4'), retry_count = 
5, retry_on_repo_unavailability = False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4-native'), 
retry_count = 5, retry_on_repo_unavailability = False)
@@ -1425,7 +1331,6 @@ class TestOozieServer(RMFTestCase):
       'type': 'rolling_upgrade',
       'orchestration': 'STANDARD'
     }
-    json_content['repositoryFile'] = REPOSITORY_FILE_DICT
 
     mocks_dict = {}
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
"/scripts/oozie_server.py",
@@ -1450,33 +1355,6 @@ class TestOozieServer(RMFTestCase):
 
     self.assertResourceCalled('Directory', 
'/usr/hdp/current/oozie-server/libext', mode = 0777)
 
-    self.assertResourceCalled('Repository', 'HDP-2.6-repo-1',
-        append_to_file = False,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = ['HDP', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-2.6-GPL-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = ['HDP-GPL', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-UTILS-1.1.0.22-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6',
-        action = ['create'],
-        components = ['HDP-UTILS', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
     self.assertResourceCalled('Package', ('lzo'), retry_count=5, 
retry_on_repo_unavailability= False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4'), retry_count = 
5, retry_on_repo_unavailability = False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4-native'), 
retry_count = 5, retry_on_repo_unavailability = False)
@@ -1695,8 +1573,7 @@ class TestOozieServer(RMFTestCase):
     version = '2.3.0.0-1234'
     json_content['commandParams']['version'] = version
     json_content['clusterHostInfo']['falcon_server_hosts'] = 
['c6401.ambari.apache.org']
-    json_content['repositoryFile'] = REPOSITORY_FILE_DICT
-    
+
     mocks_dict = {}
     self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + 
"/scripts/oozie_server.py",
      classname = "OozieServer", command = "pre_upgrade_restart", config_dict = 
json_content,
@@ -1718,33 +1595,6 @@ class TestOozieServer(RMFTestCase):
 
     self.assertResourceCalled('Directory', 
'/usr/hdp/current/oozie-server/libext', mode = 0777)
 
-    self.assertResourceCalled('Repository', 'HDP-2.6-repo-1',
-        append_to_file = False,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = ['HDP', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-2.6-GPL-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-52',
-        action = ['create'],
-        components = ['HDP-GPL', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
-    self.assertResourceCalled('Repository', 'HDP-UTILS-1.1.0.22-repo-1',
-        append_to_file = True,
-        base_url = 
'http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6',
-        action = ['create'],
-        components = ['HDP-UTILS', 'main'],
-        repo_template = UnknownConfigurationMock(),
-        repo_file_name = 'ambari-hdp-1',
-        mirror_list = None,
-    )
     self.assertResourceCalled('Package', ('lzo'), retry_count=5, 
retry_on_repo_unavailability= False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4'), retry_count = 
5, retry_on_repo_unavailability = False)
     self.assertResourceCalled('Package', ('hadooplzo_1_2_3_4-native'), 
retry_count = 5, retry_on_repo_unavailability = False)

http://git-wip-us.apache.org/repos/asf/ambari/blob/83cbde7d/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json 
b/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
index 4e9a62f..29cbddc 100644
--- a/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
+++ b/ambari-server/src/test/python/stacks/2.2/configs/oozie-upgrade.json
@@ -66,44 +66,7 @@
     "role": "OOZIE_SERVER",
     "forceRefreshConfigTags": [], 
     "taskId": 305, 
-    "public_hostname": "c6402.ambari.apache.org",
-    "repositoryFile": {
-        "resolved": true, 
-        "repoVersion": "2.6.4.0-52", 
-        "repositories": [
-            {
-                "tags": [], 
-                "ambariManaged": true, 
-                "baseUrl": 
"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.4.0-52";,
 
-                "repoName": "HDP", 
-                "repoId": "HDP-2.6-repo-1", 
-                "applicableServices": []
-            }, 
-            {
-                "repoName": "HDP-GPL", 
-                "tags": [
-                    "GPL"
-                ], 
-                "ambariManaged": true, 
-                "baseUrl": 
"http://s3.amazonaws.com/dev.hortonworks.com/HDP-GPL/centos6/2.x/BUILDS/2.6.4.0-52";,
 
-                "repoId": "HDP-2.6-GPL-repo-1"
-            }, 
-            {
-                "repoName": "HDP-UTILS", 
-                "tags": [], 
-                "ambariManaged": true, 
-                "baseUrl": 
"http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6";, 
-                "repoId": "HDP-UTILS-1.1.0.22-repo-1"
-            }
-        ], 
-        "feature": {
-            "preInstalled": false, 
-            "scoped": true
-        }, 
-        "stackName": "HDP", 
-        "repoVersionId": 1, 
-        "repoFileName": "ambari-hdp-1"
-    },
+    "public_hostname": "c6402.ambari.apache.org", 
     "configurations": {
         "oozie-env": {
             "oozie_heapsize": "2048m", 

Reply via email to