diff options
author | Feng Pan <fpan@redhat.com> | 2018-02-16 21:27:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-02-16 21:27:59 +0000 |
commit | a4f70cb1db40eac845c2df17158e77163c887ff1 (patch) | |
tree | 829fe4ddf906d429695cb5a5b5cd6d2e0ed595c0 /apex/tests | |
parent | 5443898e7a1927d8e3cd35e70e3872ed5d9a6d97 (diff) | |
parent | 2beef21903d7a36bdac19b3170003043693562dd (diff) |
Merge "Fixes stale undercloud delorean repos"
Diffstat (limited to 'apex/tests')
-rw-r--r-- | apex/tests/test_apex_undercloud.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apex/tests/test_apex_undercloud.py b/apex/tests/test_apex_undercloud.py index c821ade5..0df785f9 100644 --- a/apex/tests/test_apex_undercloud.py +++ b/apex/tests/test_apex_undercloud.py @@ -197,3 +197,18 @@ class TestUndercloud(unittest.TestCase): ds = {'global_params': {}} Undercloud('img_path', 'tplt_path').generate_config(ns, ds) + + @patch.object(Undercloud, '_get_vm', return_value=None) + @patch.object(Undercloud, 'create') + @patch('apex.undercloud.undercloud.virt_utils') + def test_update_delorean(self, mock_vutils, mock_uc_create, mock_get_vm): + uc = Undercloud('img_path', 'tmplt_path', external_network=True) + uc._update_delorean_repo() + download_cmd = ( + "curl -L -f -o " + "/etc/yum.repos.d/deloran.repo " + "https://trunk.rdoproject.org/centos7-{}" + "/current-tripleo/delorean.repo".format( + constants.DEFAULT_OS_VERSION)) + test_ops = {'--run-command': download_cmd} + mock_vutils.virt_customize.assert_called_with(test_ops, uc.volume) |