Browse Source

Fix multiple typos in tests

- Fix check run snapshot names
- Add test for post-install on controllers
- Remove plugin activation in non-murano deployments

Change-Id: I61203f7f55c4840e05cfe7db703e9cbf91235868
Victor Ryzhenkin 2 years ago
parent
commit
c3fe7c20a3

+ 9
- 2
murano_plugin_tests/helpers/helpers.py View File

@@ -195,6 +195,14 @@ class PluginHelper(object):
195 195
             configure_ssl=ssl)
196 196
         return self._cluster_id
197 197
 
198
+    def apply_changes(self, check_services=False):
199
+        """Deploy changed cluster.
200
+
201
+        :param check_services: run OSTF after the deployment (default: False).
202
+        """
203
+        self.fuel_web.deploy_cluster_wait(self.cluster_id,
204
+                                          check_services=check_services)
205
+
198 206
     def deploy_cluster(self, nodes_roles, verify_network=False,
199 207
                        update_interfaces=True, check_services=True):
200 208
         """Assign roles to nodes and deploy the cluster.
@@ -216,8 +224,7 @@ class PluginHelper(object):
216 224
                                    update_interfaces=update_interfaces)
217 225
         if verify_network:
218 226
             self.fuel_web.verify_network(self.cluster_id)
219
-        self.fuel_web.deploy_cluster_wait(self.cluster_id,
220
-                                          check_services=check_services)
227
+        self.apply_changes(check_services=check_services)
221 228
 
222 229
     def run_ostf(self, *args, **kwargs):
223 230
         """Run the OpenStack health checks."""

+ 2
- 2
murano_plugin_tests/murano_plugin/test_murano_plugin_bvt.py View File

@@ -41,7 +41,7 @@ class TestMuranoPluginBvt(api.MuranoPluginApi):
41 41
         Duration 90m
42 42
         Snapshot deploy_murano_plugin_on_controller
43 43
         """
44
-        self.check_run("deploy_murano_plugin")
44
+        self.check_run("deploy_murano_plugin_on_controller")
45 45
 
46 46
         self.env.revert_snapshot("ready_with_3_slaves")
47 47
 
@@ -77,7 +77,7 @@ class TestMuranoPluginBvt(api.MuranoPluginApi):
77 77
         Duration 90m
78 78
         Snapshot deploy_murano_plugin_on_controller_ha
79 79
         """
80
-        self.check_run("deploy_murano_plugin")
80
+        self.check_run("deploy_murano_plugin_on_controller_ha")
81 81
 
82 82
         self.env.revert_snapshot("ready_with_3_slaves")
83 83
 

+ 9
- 22
murano_plugin_tests/murano_plugin/test_murano_plugin_update.py View File

@@ -43,17 +43,14 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
43 43
         Snapshot deploy_murano_plugin_in_environment_with_murano
44 44
         """
45 45
 
46
-        self.check_run("deploy_environment_with_murano_plugin")
46
+        self.check_run("deploy_murano_plugin_in_environment_with_murano")
47 47
 
48 48
         self.env.revert_snapshot("ready_with_3_slaves")
49 49
 
50 50
         self.helpers.create_cluster(name=self.__class__.__name__,
51 51
                                     settings={'murano': True})
52 52
 
53
-        self.helpers.deploy_cluster({
54
-            'slave-01': ['controller'],
55
-            'slave-02': ['compute'],
56
-        })
53
+        self.helpers.deploy_cluster(self.only_controllers)
57 54
 
58 55
         self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
59 56
 
@@ -61,18 +58,13 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
61 58
 
62 59
         self.activate_plugin()
63 60
 
64
-        self.helpers.deploy_cluster({
65
-            'slave-01': ['controller'],
66
-            'slave-02': ['compute'],
67
-        })
68
-
69
-        self.check_plugin_online()
61
+        self.helpers.apply_changes()
70 62
 
71 63
         self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
72 64
 
73 65
         self.env.make_snapshot(
74 66
             "deploy_murano_plugin_in_environment_with_murano",
75
-            is_make=True)
67
+            is_make=False)
76 68
 
77 69
     @test(depends_on_groups=["prepare_slaves_3"],
78 70
           groups=["deploy_murano_and_plugin_add_role", "deploy",
@@ -101,24 +93,19 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi):
101 93
         self.helpers.create_cluster(name=self.__class__.__name__,
102 94
                                     settings={'murano': True})
103 95
 
104
-        self.helpers.deploy_cluster({
105
-            'slave-01': ['controller'],
106
-            'slave-02': ['compute'],
107
-        })
96
+        self.helpers.deploy_cluster(self.only_controllers)
108 97
 
109 98
         self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
110 99
 
111 100
         self.prepare_plugin()
112 101
 
113
-        self.activate_plugin(['sanity', 'smoke', 'tests_platform'])
102
+        self.activate_plugin()
114 103
 
115
-        self.helpers.deploy_cluster({
104
+        self.helpers.add_nodes_to_cluster({
116 105
             'slave-03': plugin_settings.role_name,
117 106
         })
118 107
 
119
-        self.check_plugin_online()
120
-
121
-        self.helpers.run_ostf()
108
+        self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform'])
122 109
 
123 110
         self.env.make_snapshot("deploy_murano_node_in_environment_with_murano",
124
-                               is_make=True)
111
+                               is_make=False)

+ 52
- 26
murano_plugin_tests/murano_plugin/test_post_install.py View File

@@ -26,8 +26,7 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
26 26
     """
27 27
 
28 28
     @test(depends_on_groups=["prepare_slaves_3"],
29
-          groups=["deploy_environment_without_murano_plugin", "deploy",
30
-                  "murano_plugin", "post_installation", 'murano'])
29
+          groups=["deploy_environment_without_murano_plugin", "deploy"])
31 30
     @log_snapshot_after_test
32 31
     def deploy_environment_without_murano_plugin(self):
33 32
         """Deploy a cluster without the Murano Detach plugin.
@@ -36,11 +35,8 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
36 35
             1. Create the cluster
37 36
             2. Add 1 node with the controller role
38 37
             3. Add 1 node with the compute and cinder roles
39
-            4. Upload the plugin to the master node
40
-            5. Install the plugin
41
-            6. Configure the plugin
42
-            8. Deploy cluster
43
-            8. Run OSTF
38
+            4. Deploy cluster
39
+            5. Run OSTF
44 40
 
45 41
         Duration 60m
46 42
         Snapshot deploy_environment_without_murano_plugin
@@ -49,16 +45,9 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
49 45
 
50 46
         self.env.revert_snapshot("ready_with_3_slaves")
51 47
 
52
-        self.prepare_plugin()
53
-
54 48
         self.helpers.create_cluster(name=self.__class__.__name__)
55 49
 
56
-        self.activate_plugin()
57
-
58
-        self.helpers.deploy_cluster({
59
-            'slave-01': ['controller'],
60
-            'slave-02': ['compute', 'cinder'],
61
-        })
50
+        self.helpers.deploy_cluster(self.only_controllers)
62 51
 
63 52
         self.run_ostf(['sanity', 'smoke', 'tests_platform'])
64 53
 
@@ -66,30 +55,67 @@ class TestMuranoPostInstallation(api.MuranoPluginApi):
66 55
                                is_make=True)
67 56
 
68 57
     @test(depends_on=[deploy_environment_without_murano_plugin],
69
-          groups=["deploy_murano_plugin_in_existing_environment", "deploy",
70
-                  "murano_plugin", "post_installation", 'murano'])
58
+          groups=[
59
+              "deploy_murano_plugin_with_murano_node_in_existing_environment",
60
+              "deploy", "murano_plugin", "post_installation", 'murano'])
71 61
     @log_snapshot_after_test
72
-    def deploy_murano_plugin_in_existing_environment(self):
73
-        """Deploy the Murano Detach plugin in an existing environment.
62
+    def deploy_murano_plugin_with_murano_node_in_existing_environment(self):
63
+        """Deploy Murano plugin with murano-node in an existing environment.
74 64
 
75 65
         Scenario:
76 66
             1. Revert snapshot with deployed cluster
77
-            2. Add 1 nodes with the plugin roles
78
-            3. Deploy the cluster
79
-            4. Check that Murano Detach plugin is running
80
-            5. Run OSTF
67
+            2. Upload and install plugin
68
+            3. Activate plugin
69
+            4. Add 1 nodes with the plugin roles
70
+            5. Deploy the cluster
71
+            6. Check that Murano Detach plugin is running
72
+            7. Run Murano Platform OSTF
81 73
 
82 74
         Duration 60m
83
-        Snapshot deploy_murano_plugin_in_existing_environment
75
+        Snapshot deploy_murano_plugin_with_murano_node_in_existing_environment
84 76
         """
85
-        self.check_run("deploy_murano_plugin_in_existing_environment")
77
+        self.check_run(
78
+            "deploy_murano_plugin_with_murano_node_in_existing_environment")
86 79
 
87 80
         self.env.revert_snapshot("deploy_environment_without_murano_plugin")
88 81
 
82
+        self.prepare_plugin()
83
+
84
+        self.activate_plugin()
85
+
89 86
         self.helpers.deploy_cluster({
90 87
             'slave-03': plugin_settings.role_name,
91 88
         })
92 89
 
93 90
         self.check_plugin_online()
94 91
 
95
-        self.run_ostf(['sanity', 'smoke', 'tests_platform'])
92
+    @test(depends_on=[deploy_environment_without_murano_plugin],
93
+          groups=["deploy_murano_plugin_on_controller_in_existing_environment",
94
+                  "deploy", "murano_plugin", "post_installation", 'murano'])
95
+    @log_snapshot_after_test
96
+    def deploy_murano_plugin_on_controller_in_existing_environment(self):
97
+        """Deploy Murano plugin with murano-node in an existing environment.
98
+
99
+        Scenario:
100
+            1. Revert snapshot with deployed cluster
101
+            2. Upload and install plugin
102
+            3. Activate plugin
103
+            4. Deploy the cluster
104
+            5. Check that Murano Detach plugin is running
105
+            6. Run Murano Platform OSTF
106
+
107
+        Duration 60m
108
+        Snapshot deploy_murano_plugin_on_controller_in_existing_environment
109
+        """
110
+        self.check_run(
111
+            "deploy_murano_plugin_on_controller_in_existing_environment")
112
+
113
+        self.env.revert_snapshot("deploy_environment_without_murano_plugin")
114
+
115
+        self.prepare_plugin()
116
+
117
+        self.activate_plugin()
118
+
119
+        self.helpers.apply_changes()
120
+
121
+        self.check_plugin_online()

Loading…
Cancel
Save