Browse Source

Change build images condition

- Our registry by default is set to local registry so
condition like 'if not settings.registry' doesn't make sense.
Change it condition to compare with local registry address

Change-Id: I7c49be77f6cdee921116df18891809eab618f376
asledzinskiy 2 years ago
parent
commit
97989e87ae

+ 1
- 1
fuel_ccp_tests/fixtures/os_fixtures.py View File

@@ -64,7 +64,7 @@ def galera_deployed(ccpcluster,
64 64
     # Note: keep fixtures in strict dependences from each other!
65 65
     if not config.os.running:
66 66
         general_config = deepcopy(settings.CCP_CONF)
67
-        if settings.BUILD_IMAGES:
67
+        if settings.REGISTRY == "127.0.0.1:31500":
68 68
             k8s_actions.create_registry()
69 69
             ccpcluster.build()
70 70
         topology_path = \

+ 1
- 1
fuel_ccp_tests/managers/osmanager.py View File

@@ -50,7 +50,7 @@ class OSManager(object):
50 50
         Deploy openstack with stacklight topology
51 51
         """
52 52
         LOG.info("Preparing openstack log collector fixture...")
53
-        if settings.BUILD_IMAGES:
53
+        if settings.REGISTRY == "127.0.0.1:31500":
54 54
             LOG.info("Creating registry...")
55 55
             self.__k8s_actions.create_registry()
56 56
             LOG.info("Building images...")

+ 4
- 12
fuel_ccp_tests/tests/system/test_deploy.py View File

@@ -46,14 +46,10 @@ class TestDeployOpenstack(base_test.SystemBaseTest):
46 46
 
47 47
         Duration 35 min
48 48
         """
49
-        if settings.BUILD_IMAGES:
49
+        if settings.REGISTRY == "127.0.0.1:31500":
50 50
             k8s_actions.create_registry()
51 51
             ccpcluster.build()
52
-        else:
53
-            if not settings.REGISTRY:
54
-                raise ValueError("The REGISTRY variable should be set with "
55
-                                 "external registry address, "
56
-                                 "current value {0}".format(settings.REGISTRY))
52
+
57 53
         ccpcluster.deploy()
58 54
         post_os_deploy_checks.check_jobs_status(k8s_actions.api)
59 55
         post_os_deploy_checks.check_pods_status(k8s_actions.api)
@@ -82,14 +78,10 @@ class TestDeployOpenstack(base_test.SystemBaseTest):
82 78
         Duration 35 min
83 79
         """
84 80
         remote = underlay.remote(host=config.k8s.kube_host)
85
-        if settings.BUILD_IMAGES:
81
+        if settings.REGISTRY == "127.0.0.1:31500":
86 82
             k8s_actions.create_registry()
87 83
             ccpcluster.build()
88
-        else:
89
-            if not settings.REGISTRY:
90
-                raise ValueError("The REGISTRY variable should be set with "
91
-                                 "external registry address, "
92
-                                 "current value {0}".format(settings.REGISTRY))
84
+
93 85
         ccpcluster.deploy()
94 86
         post_os_deploy_checks.check_jobs_status(k8s_actions.api, timeout=4500)
95 87
         post_os_deploy_checks.check_pods_status(k8s_actions.api, timeout=4500)

+ 3
- 3
fuel_ccp_tests/tests/system/test_few_os.py View File

@@ -45,7 +45,7 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
45 45
 
46 46
         Duration 90 min
47 47
         """
48
-        if not settings.REGISTRY:
48
+        if settings.REGISTRY == "127.0.0.1:31500":
49 49
             k8s_actions.create_registry()
50 50
             ccpcluster.build()
51 51
         topology_path = \
@@ -113,7 +113,7 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
113 113
 
114 114
         Duration 90 min
115 115
         """
116
-        if not settings.REGISTRY:
116
+        if settings.REGISTRY == "127.0.0.1:31500":
117 117
             k8s_actions.create_registry()
118 118
             ccpcluster.build()
119 119
         topology_path = \
@@ -182,7 +182,7 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
182 182
 
183 183
         Duration 60 min
184 184
         """
185
-        if not settings.REGISTRY:
185
+        if settings.REGISTRY == "127.0.0.1:31500":
186 186
             k8s_actions.create_registry()
187 187
             ccpcluster.build()
188 188
         topology_path = \

Loading…
Cancel
Save