summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_undercloud_builder.py
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-09-12 17:32:56 -0400
committerTim Rozet <trozet@redhat.com>2017-11-06 04:35:02 +0000
commitb3c610b205f88dddb02cdac39638c52eafaaf82c (patch)
tree4826027e2d968e61c8024d972f3665ff3a8a09d7 /apex/tests/test_apex_undercloud_builder.py
parent3c7556eb0734706f28588fb952eedea2d424c6d2 (diff)
Adds ability to deploy from upstream openstack
To deploy with upstream openstack branch, use new deploy setting 'os_version'. A default scenario file for nosdn with pike has been included in this patch. If 'os_version' is a version other than the default version for this OPNFV release, then upstream is used. In order to use upstream with the current OS version use '--upstream' argument to the deploy command, to force an upstream deployment. Also include '-e upstream-environment.yaml' to use default upstream deployment settings. Supports nosdn and odl-nofeature deployments. Change-Id: Ic07e308827b449637b4e86cdd086434e4de2fb69 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/tests/test_apex_undercloud_builder.py')
-rw-r--r--apex/tests/test_apex_undercloud_builder.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/apex/tests/test_apex_undercloud_builder.py b/apex/tests/test_apex_undercloud_builder.py
new file mode 100644
index 00000000..c7498880
--- /dev/null
+++ b/apex/tests/test_apex_undercloud_builder.py
@@ -0,0 +1,34 @@
+##############################################################################
+# Copyright (c) 2017 Tim Rozet (Red Hat)
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import unittest
+
+from apex.builders import undercloud_builder as uc_builder
+from mock import patch
+
+
+class TestUndercloudBuilder(unittest.TestCase):
+ @classmethod
+ def setup_class(cls):
+ """This method is run once for each class before any tests are run"""
+
+ @classmethod
+ def teardown_class(cls):
+ """This method is run once for each class _after_ all tests are run"""
+
+ def setup(self):
+ """This method is run once before _each_ test method is executed"""
+
+ def teardown(self):
+ """This method is run once after _each_ test method is executed"""
+
+ @patch('apex.virtual.utils.virt_customize')
+ def test_add_upstream_pkgs(self, mock_customize):
+ uc_builder.add_upstream_packages('dummy.qcow2')
+ assert mock_customize.called