Browse Source

Revert only the latest snapshot that matches the test requirements

- add pytest marks 'revert_snapshot' to all required fixtures instead
  of reverting the snapshots inside them
- add get_top_fixtures_marks() that extracts all the marks
  'revert_snapshot' from the test and it's fixtures, order the marks
  in the same way as the fixtures depends on each other,
- in the fixture 'revert_snapshot' try to find the most suitable
  snapshot for reverting, from latest to earliest.
- mark 'revert_snapshot' removed from system tests which use fixtures
  with the same mark (for example, 'k8s_deployed' mark removed from
  system tests where the fixture 'k8scluster' is used as a top fixture)

Change-Id: Iad9e56d96d870aa4204ba23e76a5b4df01d4385b
Co-Authored-By: Dmitry Tyzhnenko <dtyzhnenko@mirantis.com>
Dennis Dmitriev 2 years ago
parent
commit
a736489db9

+ 1
- 8
fuel_ccp_tests/fixtures/ccp_fixtures.py View File

@@ -33,6 +33,7 @@ def ccp_actions(config, underlay):
33 33
     return ccpmanager.CCPManager(config, underlay)
34 34
 
35 35
 
36
+@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
36 37
 @pytest.fixture(scope='function')
37 38
 def ccpcluster(revert_snapshot, config, hardware,
38 39
                underlay, k8scluster, ccp_actions):
@@ -61,14 +62,6 @@ def ccpcluster(revert_snapshot, config, hardware,
61 62
 
62 63
     ccp_actions.default_params = settings.CCP_CLI_PARAMS
63 64
 
64
-    # If no snapshot was reverted, then try to revert the snapshot
65
-    # that belongs to the fixture.
66
-    # Note: keep fixtures in strict dependences from each other!
67
-    if not revert_snapshot:
68
-        if hardware.has_snapshot(ext.SNAPSHOT.ccp_deployed) and \
69
-                hardware.has_snapshot_config(ext.SNAPSHOT.ccp_deployed):
70
-            hardware.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
71
-
72 65
     # Install CCP
73 66
     if config.ccp.os_host == '0.0.0.0':
74 67
         ccp_actions.install_ccp()

+ 1
- 8
fuel_ccp_tests/fixtures/k8s_fixtures.py View File

@@ -36,6 +36,7 @@ def k8s_actions(config, underlay):
36 36
     return k8smanager.K8SManager(config, underlay)
37 37
 
38 38
 
39
+@pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
39 40
 @pytest.fixture(scope='function')
40 41
 def k8scluster(revert_snapshot, request, config,
41 42
                hardware, underlay, k8s_actions):
@@ -61,14 +62,6 @@ def k8scluster(revert_snapshot, request, config,
61 62
     If you want to revert 'k8s_deployed' snapshot, please use mark:
62 63
     @pytest.mark.revert_snapshot("k8s_deployed")
63 64
     """
64
-    # If no snapshot was reverted, then try to revert the snapshot
65
-    # that belongs to the fixture.
66
-    # Note: keep fixtures in strict dependences from each other!
67
-    if not revert_snapshot:
68
-        if hardware.has_snapshot(ext.SNAPSHOT.k8s_deployed) and \
69
-                hardware.has_snapshot_config(ext.SNAPSHOT.k8s_deployed):
70
-            hardware.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
71
-
72 65
     # Create k8s cluster
73 66
     if config.k8s.kube_host == '0.0.0.0':
74 67
         kube_settings = getattr(request.instance, 'kube_settings',

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

@@ -21,6 +21,7 @@ from fuel_ccp_tests.managers.osmanager import OSManager
21 21
 LOG = logger.logger
22 22
 
23 23
 
24
+@pytest.mark.revert_snapshot(ext.SNAPSHOT.os_deployed)
24 25
 @pytest.fixture(scope='function')
25 26
 def os_deployed(ccpcluster,
26 27
                 hardware,
@@ -30,14 +31,6 @@ def os_deployed(ccpcluster,
30 31
                 k8s_actions):
31 32
     """Deploy openstack
32 33
     """
33
-    # If no snapshot was reverted, then try to revert the snapshot
34
-    # that belongs to the fixture.
35
-    # Note: keep fixtures in strict dependences from each other!
36
-    if not revert_snapshot:
37
-        if hardware.has_snapshot(ext.SNAPSHOT.os_deployed) and \
38
-                hardware.has_snapshot_config(ext.SNAPSHOT.os_deployed):
39
-            hardware.revert_snapshot(ext.SNAPSHOT.os_deployed)
40
-
41 34
     osmanager = OSManager(config, underlay, k8s_actions, ccpcluster)
42 35
     if not config.os.running:
43 36
         LOG.info("Preparing openstack log collector fixture...")

+ 16
- 34
fuel_ccp_tests/fixtures/underlay_fixtures.py View File

@@ -16,6 +16,7 @@ import pytest
16 16
 from datetime import datetime
17 17
 
18 18
 from fuel_ccp_tests.helpers import ext
19
+from fuel_ccp_tests.helpers import utils
19 20
 from fuel_ccp_tests import logger
20 21
 from fuel_ccp_tests import settings
21 22
 from fuel_ccp_tests.managers import envmanager_devops
@@ -25,20 +26,6 @@ from fuel_ccp_tests.managers import underlay_ssh_manager
25 26
 LOG = logger.logger
26 27
 
27 28
 
28
-def extract_name_from_mark(mark):
29
-    """Simple function to extract name from mark
30
-
31
-    :param mark: pytest.mark.MarkInfo
32
-    :rtype: string or None
33
-    """
34
-    if mark:
35
-        if len(mark.args) > 0:
36
-            return mark.args[0]
37
-        elif 'name' in mark.kwargs:
38
-            return mark.kwargs['name']
39
-    return None
40
-
41
-
42 29
 @pytest.fixture(scope="session")
43 30
 def hardware(request, config):
44 31
     """Fixture for manage the hardware layer.
@@ -110,17 +97,19 @@ def revert_snapshot(request, hardware):
110 97
 
111 98
     :rtype string: name of the reverted snapshot or None
112 99
     """
113
-    revert_snapshot = request.keywords.get('revert_snapshot', None)
114
-    snapshot_name = extract_name_from_mark(revert_snapshot)
115
-
116
-    if snapshot_name and \
117
-            hardware.has_snapshot(snapshot_name) and \
118
-            hardware.has_snapshot_config(snapshot_name):
119
-        hardware.revert_snapshot(snapshot_name)
120
-        return snapshot_name
121
-    else:
122
-        hardware.revert_snapshot(ext.SNAPSHOT.hardware)
123
-        return None
100
+    top_fixtures_snapshots = utils.get_top_fixtures_marks(
101
+        request, 'revert_snapshot')
102
+
103
+    # Try to revert the best matches snapshot for the test
104
+    for snapshot_name in top_fixtures_snapshots:
105
+        if hardware.has_snapshot(snapshot_name) and \
106
+                hardware.has_snapshot_config(snapshot_name):
107
+            hardware.revert_snapshot(snapshot_name)
108
+            return snapshot_name
109
+
110
+    # Fallback to the basic snapshot
111
+    hardware.revert_snapshot(ext.SNAPSHOT.hardware)
112
+    return None
124 113
 
125 114
 
126 115
 @pytest.fixture(scope='function', autouse=True)
@@ -146,7 +135,7 @@ def snapshot(request, hardware):
146 135
                                         request.node.function.__name__)
147 136
         if hasattr(request.node, 'rep_call') and request.node.rep_call.passed \
148 137
                 and snapshot_needed:
149
-            snapshot_name = extract_name_from_mark(snapshot_needed) or \
138
+            snapshot_name = utils.extract_name_from_mark(snapshot_needed) or \
150 139
                 "{}_passed".format(default_snapshot_name)
151 140
             hardware.create_snapshot(snapshot_name)
152 141
 
@@ -163,6 +152,7 @@ def snapshot(request, hardware):
163 152
     request.addfinalizer(test_fin)
164 153
 
165 154
 
155
+@pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
166 156
 @pytest.fixture(scope="function")
167 157
 def underlay(revert_snapshot, config, hardware):
168 158
     """Fixture that should provide SSH access to underlay objects.
@@ -179,14 +169,6 @@ def underlay(revert_snapshot, config, hardware):
179 169
                                - provide SSH access to underlay nodes using
180 170
                                  node names or node IPs.
181 171
     """
182
-    # If no snapshot was reverted, then try to revert the snapshot
183
-    # that belongs to the fixture.
184
-    # Note: keep fixtures in strict dependences from each other!
185
-    if not revert_snapshot:
186
-        if hardware.has_snapshot(ext.SNAPSHOT.underlay) and \
187
-                hardware.has_snapshot_config(ext.SNAPSHOT.underlay):
188
-            hardware.revert_snapshot(ext.SNAPSHOT.underlay)
189
-
190 172
     # Create Underlay
191 173
     if not config.underlay.ssh:
192 174
         # If config.underlay.ssh wasn't provided from external config, then

+ 72
- 0
fuel_ccp_tests/helpers/utils.py View File

@@ -411,3 +411,75 @@ class YamlEditor(object):
411 411
         if self.content == self.__original_content:
412 412
             return
413 413
         self.write_content()
414
+
415
+
416
+def extract_name_from_mark(mark):
417
+    """Simple function to extract name from pytest mark
418
+
419
+    :param mark: pytest.mark.MarkInfo
420
+    :rtype: string or None
421
+    """
422
+    if mark:
423
+        if len(mark.args) > 0:
424
+            return mark.args[0]
425
+        elif 'name' in mark.kwargs:
426
+            return mark.kwargs['name']
427
+    return None
428
+
429
+
430
+def get_top_fixtures_marks(request, mark_name):
431
+    """Order marks according to fixtures order
432
+
433
+    When a test use fixtures that depend on each other in some order,
434
+    that fixtures can have the same pytest mark.
435
+
436
+    This method extracts such marks from fixtures that are used in the
437
+    current test and return the content of the marks ordered by the
438
+    fixture dependences.
439
+    If the test case have the same mark, than the content of this mark
440
+    will be the first element in the resulting list.
441
+
442
+    :param request: pytest 'request' fixture
443
+    :param mark_name: name of the mark to search on the fixtures and the test
444
+
445
+    :rtype list: marks content, from last to first executed.
446
+    """
447
+
448
+    fixtureinfo = request.session._fixturemanager.getfixtureinfo(
449
+        request.node, request.function, request.cls)
450
+
451
+    top_fixtures_names = []
452
+    for _ in enumerate(fixtureinfo.name2fixturedefs):
453
+        parent_fixtures = set()
454
+        child_fixtures = set()
455
+        for name in sorted(fixtureinfo.name2fixturedefs):
456
+            if name in top_fixtures_names:
457
+                continue
458
+            parent_fixtures.add(name)
459
+            child_fixtures.update(
460
+                fixtureinfo.name2fixturedefs[name][0].argnames)
461
+        top_fixtures_names.extend(list(parent_fixtures - child_fixtures))
462
+
463
+    top_fixtures_marks = []
464
+
465
+    if mark_name in request.function.func_dict:
466
+        # The top priority is the 'revert_snapshot' mark on the test
467
+        top_fixtures_marks.append(
468
+            extract_name_from_mark(
469
+                request.function.func_dict[mark_name]))
470
+
471
+    for top_fixtures_name in top_fixtures_names:
472
+        fd = fixtureinfo.name2fixturedefs[top_fixtures_name][0]
473
+        if mark_name in fd.func.func_dict:
474
+            fixture_mark = extract_name_from_mark(
475
+                fd.func.func_dict[mark_name])
476
+            # Append the snapshot names in the order that fixtures are called
477
+            # starting from the last called fixture to the first one
478
+            top_fixtures_marks.append(fixture_mark)
479
+
480
+    LOG.debug("Fixtures ordered from last to first called: {0}"
481
+              .format(top_fixtures_names))
482
+    LOG.debug("Marks ordered from most to least preffered: {0}"
483
+              .format(top_fixtures_marks))
484
+
485
+    return top_fixtures_marks

+ 0
- 2
fuel_ccp_tests/tests/component/k8s/test_appcontroller.py View File

@@ -20,7 +20,6 @@ import yaml
20 20
 
21 21
 from fuel_ccp_tests import logger
22 22
 from fuel_ccp_tests import settings
23
-from fuel_ccp_tests.helpers import ext
24 23
 
25 24
 LOG = logger.logger
26 25
 
@@ -141,7 +140,6 @@ class TestAppController(object):
141 140
     }
142 141
 
143 142
     @pytest.mark.ac_linear_test
144
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
145 143
     @pytest.mark.skipif(settings.AC_PATH is None,
146 144
                         reason="ApplicationController repo path is not set!")
147 145
     def test_linear(self, underlay, k8scluster, show_step):

+ 0
- 2
fuel_ccp_tests/tests/component/k8s/test_dashboard.py View File

@@ -13,7 +13,6 @@
13 13
 #    under the License.
14 14
 import pytest
15 15
 
16
-from fuel_ccp_tests.helpers import ext
17 16
 from fuel_ccp_tests import logger
18 17
 from fuel_ccp_tests import settings
19 18
 
@@ -30,7 +29,6 @@ class TestK8sDashboard(object):
30 29
         "searchdomains": settings.SEARCH_DOMAINS,
31 30
     }
32 31
 
33
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
34 32
     @pytest.mark.fail_snapshot
35 33
     @pytest.mark.dashboard_exists
36 34
     def test_k8s_dashboard_exists(self, k8scluster):

+ 0
- 2
fuel_ccp_tests/tests/component/k8s/test_k8s_lvm_plugin_usage.py View File

@@ -14,7 +14,6 @@
14 14
 import pytest
15 15
 
16 16
 from fuel_ccp_tests import logger
17
-from fuel_ccp_tests.helpers import ext
18 17
 
19 18
 LOG = logger.logger
20 19
 
@@ -38,7 +37,6 @@ class TestLVMPluginUsage(object):
38 37
                               timeout=120)
39 38
 
40 39
     @pytest.mark.nginx_with_lvm
41
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
42 40
     def test_create_nginx_with_lvm(self, underlay, k8scluster):
43 41
         """Test creating pod with LVM plugin
44 42
 

+ 0
- 11
fuel_ccp_tests/tests/system/test_ccp_install_k8s.py View File

@@ -17,7 +17,6 @@ import pytest
17 17
 
18 18
 import base_test
19 19
 from fuel_ccp_tests import settings
20
-from fuel_ccp_tests.helpers import ext
21 20
 
22 21
 
23 22
 class FuelCCPInstallerConfigMixin:
@@ -77,7 +76,6 @@ class TestFuelCCPInstaller(base_test.SystemBaseTest,
77 76
 
78 77
     @pytest.mark.k8s_installed_default
79 78
     @pytest.mark.snapshot_needed
80
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
81 79
     @pytest.mark.fail_snapshot
82 80
     def test_k8s_installed_default(self, underlay, k8s_actions):
83 81
         """Test for deploying an k8s environment and check it
@@ -107,7 +105,6 @@ class TestFuelCCPInstaller(base_test.SystemBaseTest,
107 105
 
108 106
     @pytest.mark.k8s_installed_custom
109 107
     @pytest.mark.snapshot_needed
110
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
111 108
     @pytest.mark.fail_snapshot
112 109
     @pytest.mark.bvt
113 110
     def test_k8s_installed_custom(self, underlay, k8s_actions, show_step):
@@ -151,7 +148,6 @@ class TestFuelCCPInstaller(base_test.SystemBaseTest,
151 148
 
152 149
     @pytest.mark.k8s_installed_with_etcd_on_host
153 150
     @pytest.mark.snapshot_needed
154
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
155 151
     @pytest.mark.fail_snapshot
156 152
     def test_k8s_installed_with_etcd_on_host(self, underlay, k8s_actions):
157 153
         """Test for deploying an k8s environment and check it
@@ -192,7 +188,6 @@ class TestFuelCCPInstaller(base_test.SystemBaseTest,
192 188
 
193 189
     @pytest.mark.k8s_installed_with_etcd_in_container
194 190
     @pytest.mark.snapshot_needed
195
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
196 191
     @pytest.mark.fail_snapshot
197 192
     def test_k8s_installed_with_etcd_in_container(self, underlay, k8s_actions):
198 193
         """Test for deploying an k8s environment and check it
@@ -233,7 +228,6 @@ class TestFuelCCPInstaller(base_test.SystemBaseTest,
233 228
 
234 229
     @pytest.mark.k8s_installed_with_ready_ssh_keys
235 230
     @pytest.mark.snapshot_needed
236
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
237 231
     @pytest.mark.fail_snapshot
238 232
     def test_k8s_installed_with_ready_ssh_keys(self, ssh_keys_dir,
239 233
                                                underlay, k8s_actions):
@@ -267,7 +261,6 @@ class TestFuelCCPInstaller(base_test.SystemBaseTest,
267 261
         k8s_actions.check_pod_delete(pod)
268 262
 
269 263
     @pytest.mark.test_k8s_installed_with_ipip
270
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
271 264
     @pytest.mark.fail_snapshot
272 265
     def test_k8s_installed_with_ipip(self, underlay, k8s_actions, show_step):
273 266
         """Test for deploying an k8s environment with IPIP tunnels for Calico
@@ -326,7 +319,6 @@ class TestFuelCCPInstallerIdempotency(base_test.SystemBaseTest,
326 319
 
327 320
     @pytest.mark.ccp_idempotency_default
328 321
     @pytest.mark.snapshot_needed
329
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
330 322
     @pytest.mark.fail_snapshot
331 323
     def test_k8s_ccp_idempotency_default(self, config, underlay, k8s_actions):
332 324
         """Test for deploying an k8s environment and check it
@@ -350,7 +342,6 @@ class TestFuelCCPInstallerIdempotency(base_test.SystemBaseTest,
350 342
 
351 343
     @pytest.mark.ccp_idempotency_with_etcd_on_host
352 344
     @pytest.mark.snapshot_needed
353
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
354 345
     @pytest.mark.fail_snapshot
355 346
     def test_ccp_idempotency_with_etcd_on_host(self, config, underlay,
356 347
                                                k8s_actions):
@@ -383,7 +374,6 @@ class TestFuelCCPInstallerIdempotency(base_test.SystemBaseTest,
383 374
 
384 375
     @pytest.mark.ccp_idempotency_with_etcd_in_container
385 376
     @pytest.mark.snapshot_needed
386
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
387 377
     @pytest.mark.fail_snapshot
388 378
     def test_ccp_idempotency_with_etcd_in_container(self, config, underlay,
389 379
                                                     k8s_actions):
@@ -418,7 +408,6 @@ class TestFuelCCPInstallerIdempotency(base_test.SystemBaseTest,
418 408
 
419 409
     @pytest.mark.ccp_idempotency_with_ready_ssh_keys
420 410
     @pytest.mark.snapshot_needed
421
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.underlay)
422 411
     @pytest.mark.fail_snapshot
423 412
     def test_ccp_idempotency_with_ready_ssh_keys(self, ssh_keys_dir,
424 413
                                                  config, underlay,

+ 0
- 14
fuel_ccp_tests/tests/system/test_daemonsets.py View File

@@ -17,7 +17,6 @@ import time
17 17
 from devops.helpers import helpers
18 18
 import pytest
19 19
 
20
-from fuel_ccp_tests.helpers import ext
21 20
 from fuel_ccp_tests import logger
22 21
 
23 22
 LOG = logger.logger
@@ -173,7 +172,6 @@ class TestDaemonsetsUpdates():
173 172
                 start_time_after_rollout)
174 173
         )
175 174
 
176
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
177 175
     @pytest.mark.fail_snapshot
178 176
     @pytest.mark.snapshot_needed
179 177
     def test_daemonset_rollingupdate_noop(self, k8scluster, show_step):
@@ -254,7 +252,6 @@ class TestDaemonsetsUpdates():
254 252
         # Pods should have the new image version
255 253
         self.check_nginx_pods_image(k8sclient, self.to_nginx_image)
256 254
 
257
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
258 255
     @pytest.mark.fail_snapshot
259 256
     @pytest.mark.snapshot_needed
260 257
     def test_daemonset_rollingupdate(self, k8scluster, show_step):
@@ -322,7 +319,6 @@ class TestDaemonsetsUpdates():
322 319
                 self.to_nginx_image),
323 320
             timeout=2 * 60)
324 321
 
325
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
326 322
     @pytest.mark.fail_snapshot
327 323
     @pytest.mark.snapshot_needed
328 324
     def test_daemonset_rollout_rollingupdate(self, underlay,
@@ -373,7 +369,6 @@ class TestDaemonsetsUpdates():
373 369
             timeout=2 * 60
374 370
         )
375 371
 
376
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
377 372
     @pytest.mark.fail_snapshot
378 373
     @pytest.mark.snapshot_needed
379 374
     def test_daemonset_rollout_noop(self, underlay,
@@ -441,7 +436,6 @@ class TestDaemonsetsUpdates():
441 436
         # Pods should have the old image version
442 437
         self.check_nginx_pods_image(k8sclient, self.from_nginx_image)
443 438
 
444
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
445 439
     @pytest.mark.fail_snapshot
446 440
     @pytest.mark.snapshot_needed
447 441
     def test_daemonset_multirollout_rollingupdate(self, underlay, k8scluster,
@@ -523,7 +517,6 @@ class TestDaemonsetsUpdates():
523 517
             timeout=2 * 60
524 518
         )
525 519
 
526
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
527 520
     @pytest.mark.fail_snapshot
528 521
     @pytest.mark.snapshot_needed
529 522
     def test_daemonset_multirollout_rollingupdate_revision(self,
@@ -688,7 +681,6 @@ class TestDaemonsetsUpdates():
688 681
             timeout=2 * 60
689 682
         )
690 683
 
691
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
692 684
     @pytest.mark.fail_snapshot
693 685
     @pytest.mark.snapshot_needed
694 686
     def test_daemonset_multirollout_rollingupdate_default(self, underlay,
@@ -772,7 +764,6 @@ class TestDaemonsetsUpdates():
772 764
             timeout=2 * 60
773 765
         )
774 766
 
775
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
776 767
     @pytest.mark.fail_snapshot
777 768
     @pytest.mark.snapshot_needed
778 769
     def test_daemonset_skip_rollout(self, underlay, k8scluster,
@@ -821,7 +812,6 @@ class TestDaemonsetsUpdates():
821 812
         show_step(6)
822 813
         self.check_rollout_skipping(k8sclient, config.k8s.kube_host, underlay)
823 814
 
824
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
825 815
     @pytest.mark.fail_snapshot
826 816
     @pytest.mark.snapshot_needed
827 817
     def test_daemonset_skip_rollout_revision(self, underlay, k8scluster,
@@ -871,7 +861,6 @@ class TestDaemonsetsUpdates():
871 861
         self.check_rollout_skipping(k8sclient, config.k8s.kube_host,
872 862
                                     underlay, revision=True)
873 863
 
874
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
875 864
     @pytest.mark.fail_snapshot
876 865
     @pytest.mark.snapshot_needed
877 866
     def test_daemonset_rollout_revision_negative_1(self, underlay, k8scluster,
@@ -930,7 +919,6 @@ class TestDaemonsetsUpdates():
930 919
                 pods_start_time_after_cmd)
931 920
         )
932 921
 
933
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
934 922
     @pytest.mark.fail_snapshot
935 923
     @pytest.mark.snapshot_needed
936 924
     def test_daemonset_rollout_revision_negative_2(self, underlay, k8scluster,
@@ -990,7 +978,6 @@ class TestDaemonsetsUpdates():
990 978
                 pods_start_time_after_cmd)
991 979
         )
992 980
 
993
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
994 981
     @pytest.mark.fail_snapshot
995 982
     @pytest.mark.snapshot_needed
996 983
     def test_daemonset_rollout_revision_negative_3(self, underlay, k8scluster,
@@ -1049,7 +1036,6 @@ class TestDaemonsetsUpdates():
1049 1036
                 pods_start_time_after_cmd)
1050 1037
         )
1051 1038
 
1052
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
1053 1039
     @pytest.mark.fail_snapshot
1054 1040
     @pytest.mark.snapshot_needed
1055 1041
     def test_daemonset_rollout_revision_negative_4(self, underlay, k8scluster,

+ 0
- 3
fuel_ccp_tests/tests/system/test_deploy.py View File

@@ -21,7 +21,6 @@ import base_test
21 21
 from fuel_ccp_tests import logger
22 22
 from fuel_ccp_tests import settings
23 23
 from fuel_ccp_tests.helpers import post_os_deploy_checks
24
-from fuel_ccp_tests.helpers import ext
25 24
 
26 25
 LOG = logger.logger
27 26
 
@@ -32,7 +31,6 @@ class TestDeployOpenstack(base_test.SystemBaseTest):
32 31
        pytest.mark: deploy_openstack
33 32
     """
34 33
 
35
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
36 34
     @pytest.mark.deploy_openstack
37 35
     @pytest.mark.fail_snapshot
38 36
     @pytest.mark.smoke
@@ -70,7 +68,6 @@ class TestDeployOpenstack(base_test.SystemBaseTest):
70 68
                 settings.IFACES['public']),
71 69
             timeout=600)
72 70
 
73
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
74 71
     @pytest.mark.fail_snapshot
75 72
     @pytest.mark.openstack_tempest
76 73
     def test_deploy_openstack_run_tempest(self, underlay, config,

+ 0
- 4
fuel_ccp_tests/tests/system/test_few_os.py View File

@@ -18,7 +18,6 @@ import pytest
18 18
 import base_test
19 19
 from fuel_ccp_tests import logger
20 20
 from fuel_ccp_tests import settings
21
-from fuel_ccp_tests.helpers import ext
22 21
 from fuel_ccp_tests.helpers import post_os_deploy_checks
23 22
 
24 23
 LOG = logger.logger
@@ -28,7 +27,6 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
28 27
     """Deploy Two OpenStack clusters with CCP
29 28
 
30 29
     """
31
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
32 30
     @pytest.mark.deploy_two_os
33 31
     @pytest.mark.fail_snapshot
34 32
     @pytest.mark.system_few_os
@@ -97,7 +95,6 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
97 95
                 settings.IFACES['public']),
98 96
             timeout=600)
99 97
 
100
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
101 98
     @pytest.mark.snapshot_needed(name="two_os")
102 99
     @pytest.mark.deploy_two_os
103 100
     @pytest.mark.fail_snapshot
@@ -168,7 +165,6 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
168 165
                 settings.IFACES['public']),
169 166
             timeout=600)
170 167
 
171
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
172 168
     @pytest.mark.deploy_two_os
173 169
     @pytest.mark.fail_snapshot
174 170
     @pytest.mark.system_few_os

+ 0
- 1
fuel_ccp_tests/tests/system/test_lcm_scale_k8s.py View File

@@ -26,7 +26,6 @@ class TestLCMScaleK8s(base_test.SystemBaseTest):
26 26
     """
27 27
 
28 28
     @pytest.mark.snapshot_needed
29
-    @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed)
30 29
     @pytest.mark.fail_snapshot
31 30
     def test_lcm_k8s_scale_up(self, hardware, underlay, k8scluster):
32 31
         """Test for scale an k8s environment

Loading…
Cancel
Save