summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_build_utils.py
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-12-04 11:20:23 -0500
committerTim Rozet <trozet@redhat.com>2018-03-16 14:51:33 -0400
commitf6dbb3929d904b4d5a9ee01f8270051e29ac1ec3 (patch)
treef2490665c2febe0ebc463714f5375483bfca9710 /apex/tests/test_apex_build_utils.py
parenta008f8394e07f1b82d5bf7288f46c63252f6084f (diff)
Enables containerized overcloud deployments
Changes Include: - For upstream deployments, Docker local registry will be updated with latest current RDO containers, regular deployments will use latest stable - Upstream container images will then be patched/modified and then re-uploaded into local docker registry with 'apex' tag - Deployment command modified to deploy with containers - Adds a --no-fetch deployment argument to disable pulling latest from upstream, and instead using what already exists in cache - Moves Undercloud NAT setup to just after undercloud is installed. This provides internet during overcloud install which is now required for upstream container deployments. - Creates loop device for Ceph deployment when no device is provided in deploy settings (for container deployment only) - Updates NIC J2 template to use the new format in OOO since the os-apply-config method is now deprecated in > Queens JIRA: APEX-566 JIRA: APEX-549 Change-Id: I0652c194c059b915a942ac7401936e8f5c69d1fa Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/tests/test_apex_build_utils.py')
-rw-r--r--apex/tests/test_apex_build_utils.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/apex/tests/test_apex_build_utils.py b/apex/tests/test_apex_build_utils.py
index d9d542d6..f18103c8 100644
--- a/apex/tests/test_apex_build_utils.py
+++ b/apex/tests/test_apex_build_utils.py
@@ -9,17 +9,20 @@
import argparse
import git
+import os
+import unittest
from mock import patch
from apex import build_utils
+from apex.tests import constants as con
from nose.tools import (
assert_is_instance,
assert_raises)
-class TestBuildUtils(object):
+class TestBuildUtils(unittest.TestCase):
@classmethod
def setup_class(cls):
"""This method is run once for each class before any tests are run"""
@@ -165,3 +168,19 @@ class TestBuildUtils(object):
def test_main_debug(self, mock_get_parser):
with patch.object(build_utils.sys, 'argv', self.sys_argv_debug):
build_utils.main()
+
+ def test_strip_patch_sections(self):
+ with open(os.path.join(con.TEST_DUMMY_CONFIG, '98faaca.diff')) as fh:
+ dummy_patch = fh.read()
+ tmp_patch = build_utils.strip_patch_sections(dummy_patch)
+ self.assertNotRegex(tmp_patch, 'releasenotes')
+ self.assertNotRegex(tmp_patch, 'Minor update ODL steps')
+ self.assertNotRegex(tmp_patch, 'Steps of upgrade are as follows')
+ self.assertNotRegex(tmp_patch, 'Steps invlolved in level 2 update')
+
+ def test_strip_no_patch_sections(self):
+ with open(os.path.join(con.TEST_DUMMY_CONFIG, '98faaca.diff')) as fh:
+ dummy_patch = fh.read()
+ tmp_patch = build_utils.strip_patch_sections(dummy_patch,
+ sections=[])
+ self.assertEqual(dummy_patch, tmp_patch)