summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_overcloud_deploy.py
diff options
context:
space:
mode:
Diffstat (limited to 'apex/tests/test_apex_overcloud_deploy.py')
-rw-r--r--apex/tests/test_apex_overcloud_deploy.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/apex/tests/test_apex_overcloud_deploy.py b/apex/tests/test_apex_overcloud_deploy.py
index ae2e8f0..b69c44d 100644
--- a/apex/tests/test_apex_overcloud_deploy.py
+++ b/apex/tests/test_apex_overcloud_deploy.py
@@ -134,7 +134,8 @@ class TestOvercloudDeploy(unittest.TestCase):
'barometer': False,
'ceph': True,
'sdn_controller': 'opendaylight',
- 'sriov': False
+ 'sriov': False,
+ 'os_version': 'queens'
},
'global_params': MagicMock()}
@@ -158,6 +159,10 @@ class TestOvercloudDeploy(unittest.TestCase):
'storage-environment.yaml', result_cmd)
assert_in('/usr/share/openstack-tripleo-heat-templates/environments'
'/services-docker/neutron-opendaylight.yaml', result_cmd)
+ ds['deploy_options']['os_version'] = 'master'
+ result_cmd = create_deploy_cmd(ds, ns, inv, '/tmp', virt)
+ assert_in('/usr/share/openstack-tripleo-heat-templates/environments'
+ '/services/neutron-opendaylight.yaml', result_cmd)
@patch('apex.overcloud.deploy.prep_sriov_env')
@patch('apex.overcloud.deploy.prep_storage_env')
@@ -170,6 +175,8 @@ class TestOvercloudDeploy(unittest.TestCase):
'global_params': MagicMock()}
ds['global_params'].__getitem__.side_effect = \
lambda i: False if i == 'ha_enabled' else MagicMock()
+ ds['deploy_options'].__getitem__.side_effect = \
+ lambda i: 'master' if i == 'os_version' else MagicMock()
ns = {'ntp': ['ntp']}
inv = MagicMock()
inv.get_node_counts.return_value = (3, 2)
@@ -191,6 +198,8 @@ class TestOvercloudDeploy(unittest.TestCase):
mock_sdn_list.return_value = []
ds = {'deploy_options': MagicMock(),
'global_params': MagicMock()}
+ ds['deploy_options'].__getitem__.side_effect = \
+ lambda i: 'master' if i == 'os_version' else MagicMock()
ns = {}
inv = MagicMock()
inv.get_node_counts.return_value = (0, 0)
@@ -648,7 +657,8 @@ class TestOvercloudDeploy(unittest.TestCase):
'containers': False,
'barometer': True,
'ceph': False,
- 'sdn_controller': 'opendaylight'
+ 'sdn_controller': 'opendaylight',
+ 'os_version': 'queens'
}
output = get_docker_sdn_file(ds_opts)
self.assertEqual(output,