Browse Source

Add system test check Murano plugin services

Check that Murano services is alive after executing
setup_repositories command

Change-Id: I0609199d59b0023287bc1c62078eb6430bb9d27b
OlehBaran 2 years ago
parent
commit
f0b084433e

+ 16
- 0
murano_plugin_tests/helpers/helpers.py View File

@@ -708,3 +708,19 @@ class PluginHelper(object):
708 708
             cmd=cmd)['stdout']
709 709
         asserts.assert_true("ALL NODES UP-TO-DATE" in std_out[-1],
710 710
                             "Cluster wasn't updated")
711
+
712
+    def get_plugin_pid(self, service_name):
713
+
714
+        controller_ip = self.fuel_web.get_nailgun_cluster_nodes_by_roles(
715
+            self.cluster_id, ['murano-node'])[0]['ip']
716
+
717
+        ps_output = self.ssh_manager.execute_on_remote(ip=controller_ip,
718
+                                                       cmd='ps ax')['stdout']
719
+        api = [ps for ps in ps_output if service_name in ps]
720
+
721
+        return api
722
+
723
+    def compare_pid(self, old_pid, new_pid):
724
+        asserts.assert_equal(old_pid, new_pid,
725
+                             'PID has changed after executing' \
726
+                             'setup_repositories command')

+ 41
- 0
murano_plugin_tests/murano_plugin/test_system.py View File

@@ -132,3 +132,44 @@ class TestSystemMuranoPlugin(api.MuranoPluginApi):
132 132
         self.run_ostf(['sanity', 'smoke', 'ha'])
133 133
 
134 134
         self.env.make_snapshot("add_remove_murano_node", is_make=False)
135
+
136
+    @test(depends_on_groups=["deploy_murano_plugin_in_environment_with_murano"],
137
+          groups=["mirror", "system", "failover",
138
+                  "create_mirror_and_check_murano_services"])
139
+    @log_snapshot_after_test
140
+    def create_mirror_and_check_murano_services(self):
141
+        """Verify that Murano services is alive after fuel create mirror
142
+
143
+        Scenario:
144
+            1. Revert snapshot with deployed cluster
145
+            (deploy_murano_plugin_in_environment_with_murano)
146
+            2. Save PID of the plugin services
147
+            3. Execute setup_repositories command for murano-node
148
+            from master node
149
+            4. Check that PID wasn't changed
150
+            5. Check that plugin is working
151
+            6. Run Murano Platform OSTF
152
+
153
+        Duration 45m
154
+        Snapshot create_mirror_and_check_murano_services
155
+        """
156
+        self.env.revert_snapshot(
157
+            "deploy_murano_plugin_in_environment_with_murano")
158
+
159
+        pid = self.helpers.get_plugin_pid('murano')
160
+
161
+        self.helpers.fuel_create_repositories(
162
+            self.helpers.get_all_ready_nodes())
163
+
164
+        new_pid = self.helpers.get_plugin_pid('murano')
165
+
166
+        self.helpers.compare_pid(pid, new_pid)
167
+
168
+        self.check_plugin_online()
169
+
170
+        self.run_ostf(['sanity', 'smoke', 'ha'])
171
+
172
+        self.check_plugin_online()
173
+
174
+        self.env.make_snapshot("create_mirror_and_check_murano_services",
175
+                               is_make=False)

Loading…
Cancel
Save