Browse Source

Add post installation tests

Change-Id: I02068985e05828eb1fa5fa1c408cc3ce978c47bc
Rodion Promyshlennikov 2 years ago
parent
commit
2c0185ddd1

+ 95
- 0
murano_plugin_tests/murano_plugin/test_post_install.py View File

@@ -0,0 +1,95 @@
1
+#    Copyright 2016 Mirantis, Inc.
2
+#
3
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
4
+#    not use this file except in compliance with the License. You may obtain
5
+#    a copy of the License at
6
+#
7
+#         http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+#    Unless required by applicable law or agreed to in writing, software
10
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+#    License for the specific language governing permissions and limitations
13
+#    under the License.
14
+
15
+from fuelweb_test.helpers.decorators import log_snapshot_after_test
16
+from proboscis import test
17
+
18
+from murano_plugin_tests.murano_plugin import api
19
+from murano_plugin_tests.murano_plugin import plugin_settings
20
+
21
+
22
+@test(groups=["plugin"])
23
+class TestMuranoPostInstallation(api.MuranoPluginApi):
24
+    """Class for testing that the Murano Detach plugin can be installed in an
25
+    existing environment.
26
+    """
27
+
28
+    @test(depends_on_groups=["prepare_slaves_3"],
29
+          groups=["deploy_environment_without_murano_plugin", "deploy",
30
+                  "murano_plugin", "post_installation"])
31
+    @log_snapshot_after_test
32
+    def deploy_environment_without_murano_plugin(self):
33
+        """Deploy a cluster without the Murano Detach plugin.
34
+
35
+        Scenario:
36
+            1. Create the cluster
37
+            2. Add 1 node with the controller role
38
+            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
44
+
45
+        Duration 60m
46
+        Snapshot deploy_environment_without_murano_plugin
47
+        """
48
+        self.check_run("deploy_environment_without_murano_plugin")
49
+
50
+        self.env.revert_snapshot("ready_with_3_slaves")
51
+
52
+        self.prepare_plugin()
53
+
54
+        self.helpers.create_cluster(name=self.__class__.__name__)
55
+
56
+        self.activate_plugin()
57
+
58
+        self.helpers.deploy_cluster({
59
+            'slave-01': ['controller'],
60
+            'slave-02': ['compute', 'cinder'],
61
+        })
62
+
63
+        self.helpers.run_ostf()
64
+
65
+        self.env.make_snapshot("deploy_environment_without_murano_plugin",
66
+                               is_make=True)
67
+
68
+    @test(depends_on=[deploy_environment_without_murano_plugin],
69
+          groups=["deploy_murano_plugin_in_existing_environment", "deploy",
70
+                  "murano_plugin", "post_installation"])
71
+    @log_snapshot_after_test
72
+    def deploy_murano_plugin_in_existing_environment(self):
73
+        """Deploy the Murano Detach plugin in an existing environment.
74
+
75
+        Scenario:
76
+            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
81
+
82
+        Duration 60m
83
+
84
+        """
85
+        self.check_run("deploy_murano_plugin_in_existing_environment")
86
+
87
+        self.env.revert_snapshot("deploy_environment_without_murano_plugin")
88
+
89
+        self.helpers.deploy_cluster({
90
+            'slave-03': plugin_settings.role_name,
91
+        })
92
+
93
+        self.check_plugin_online()
94
+
95
+        self.run_ostf()

+ 1
- 0
murano_plugin_tests/run_tests.py View File

@@ -40,6 +40,7 @@ class CloseSSHConnectionsPlugin(plugins.Plugin):
40 40
 
41 41
 def import_tests():
42 42
     from murano_plugin import test_murano_plugin_bvt  # noqa
43
+    from murano_plugin import test_post_install  # noqa
43 44
     from murano_plugin import test_system  # noqa
44 45
 
45 46
 

Loading…
Cancel
Save