Browse Source

Add system tests for deployment murano to controllers via plugin

- Added HA and non-HA system tests for deployment murano via plugin to controllers
- Fixed test names in murano upgrade tests

Change-Id: I40c76144e7dd34a159a1fa863152f6ce0047c604
Victor Ryzhenkin 2 years ago
parent
commit
0ee35e5e89

+ 18
- 0
murano_plugin_tests/murano_plugin/api.py View File

@@ -38,6 +38,24 @@ class MuranoPluginApi(object):
38 38
     def __getattr__(self, item):
39 39
         return getattr(self.test, item)
40 40
 
41
+    @property
42
+    def only_controllers_ha(self):
43
+        """Return a dict mapping nodes to Fuel roles with HA."""
44
+        return {
45
+            'slave-01': ['controller'],
46
+            'slave-02': ['controller'],
47
+            'slave-03': ['controller'],
48
+            'slave-04': ['compute', 'cinder']
49
+        }
50
+
51
+    @property
52
+    def only_controllers(self):
53
+        """Return a dict mapping nodes to Fuel roles non-HA."""
54
+        return {
55
+            'slave-01': ['controller'],
56
+            'slave-02': ['compute', 'cinder']
57
+        }
58
+
41 59
     @property
42 60
     def base_nodes(self):
43 61
         """Return a dict mapping nodes to Fuel roles without HA."""

+ 70
- 0
murano_plugin_tests/murano_plugin/test_murano_plugin_bvt.py View File

@@ -22,6 +22,76 @@ from murano_plugin_tests.murano_plugin import api
22 22
 class TestMuranoPluginBvt(api.MuranoPluginApi):
23 23
     """Class for bvt testing the Murano plugin."""
24 24
 
25
+    @test(depends_on_groups=["prepare_slaves_3"],
26
+          groups=["deploy_murano_plugin_on_controller", "deploy",
27
+                  "deploy_murano_bvt", "murano", "bvt"])
28
+    @log_snapshot_after_test
29
+    def deploy_murano_plugin_on_controller(self):
30
+        """Deploy a cluster with the Murano plugin.
31
+
32
+        Scenario:
33
+            1. Upload the Murano plugin to the master node
34
+            2. Install the plugin
35
+            3. Create the cluster
36
+            4. Add 1 node with controller role
37
+            5. Add 1 node with compute and cinder roles
38
+            6. Deploy the cluster
39
+            7. Run OSTF
40
+
41
+        Duration 90m
42
+        Snapshot deploy_murano_plugin
43
+        """
44
+        self.check_run("deploy_murano_plugin")
45
+
46
+        self.env.revert_snapshot("ready_with_3_slaves")
47
+
48
+        self.prepare_plugin()
49
+
50
+        self.helpers.create_cluster(name=self.__class__.__name__)
51
+
52
+        self.activate_plugin()
53
+
54
+        self.helpers.deploy_cluster(self.only_controllers)
55
+
56
+        self.run_ostf(['sanity', 'smoke', 'tests_platform'])
57
+
58
+        self.env.make_snapshot("deploy_murano_plugin", is_make=True)
59
+
60
+    @test(depends_on_groups=["prepare_slaves_5"],
61
+          groups=["deploy_murano_plugin_on_controller_ha", "deploy",
62
+                  "deploy_murano_bvt", "murano", "bvt"])
63
+    @log_snapshot_after_test
64
+    def deploy_murano_plugin_on_controller_ha(self):
65
+        """Deploy a cluster with the Murano plugin.
66
+
67
+        Scenario:
68
+            1. Upload the Murano plugin to the master node
69
+            2. Install the plugin
70
+            3. Create the cluster
71
+            4. Add 3 node with controller role
72
+            5. Add 1 node with compute and cinder roles
73
+            6. Deploy the cluster
74
+            7. Run OSTF
75
+
76
+        Duration 90m
77
+        Snapshot deploy_murano_plugin
78
+        """
79
+        self.check_run("deploy_murano_plugin")
80
+
81
+        self.env.revert_snapshot("ready_with_3_slaves")
82
+
83
+        self.prepare_plugin()
84
+
85
+        self.helpers.create_cluster(name=self.__class__.__name__)
86
+
87
+        self.activate_plugin()
88
+
89
+        self.helpers.deploy_cluster(self.only_controllers_ha)
90
+
91
+        self.run_ostf(['sanity', 'smoke', 'tests_platform'])
92
+
93
+        self.env.make_snapshot("deploy_murano_plugin", is_make=True)
94
+
25 95
     @test(depends_on_groups=["prepare_slaves_3"],
26 96
           groups=["deploy_murano_plugin", "deploy", "deploy_murano_bvt",
27 97
                   "murano", "bvt"])

+ 5
- 5
murano_plugin_tests/murano_plugin/test_murano_plugin_update.py View File

@@ -27,7 +27,7 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
27 27
           groups=["deploy_murano_and_plugin", "upgrade",
28 28
                   "murano"])
29 29
     @log_snapshot_after_test
30
-    def deploy_environment_with_murano_plugin(self):
30
+    def deploy_murano_plugin_in_environment_with_murano(self):
31 31
         """Upgrade Murano via plugin and run OSTF tests.
32 32
 
33 33
         Scenario:
@@ -55,7 +55,7 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
55 55
             'slave-02': ['compute'],
56 56
         })
57 57
 
58
-        self.helpers.run_ostf()
58
+        self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
59 59
 
60 60
         self.prepare_plugin()
61 61
 
@@ -68,7 +68,7 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
68 68
 
69 69
         self.check_plugin_online()
70 70
 
71
-        self.helpers.run_ostf()
71
+        self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
72 72
 
73 73
         self.env.make_snapshot("deploy_environment_with_murano_plugin",
74 74
                                is_make=True)
@@ -105,11 +105,11 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
105 105
             'slave-02': ['compute'],
106 106
         })
107 107
 
108
-        self.helpers.run_ostf()
108
+        self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
109 109
 
110 110
         self.prepare_plugin()
111 111
 
112
-        self.activate_plugin()
112
+        self.activate_plugin(['sanity', 'smoke', 'tests_platform'])
113 113
 
114 114
         self.helpers.deploy_cluster({
115 115
             'slave-03': plugin_settings.role_name,

+ 1
- 0
murano_plugin_tests/run_tests.py View File

@@ -45,6 +45,7 @@ def import_tests():
45 45
     from murano_plugin import test_post_install  # noqa
46 46
     from murano_plugin import test_system  # noqa
47 47
 
48
+
48 49
 def run_tests():
49 50
     from proboscis import TestProgram  # noqa
50 51
     import_tests()

Loading…
Cancel
Save