Browse Source

Adding upgrade tests for Murano Fuel plugin

Change-Id: Id8402cee1a828aa2a99c5713a5e865359b839b60
Oleksii Zhurba 2 years ago
parent
commit
00da8668b0

+ 123
- 0
murano_plugin_tests/murano_plugin/test_murano_plugin_update.py View File

@@ -0,0 +1,123 @@
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=["plugins"])
23
+class TestMuranoPluginUpdate(api.MuranoPluginApi):
24
+    """Class for testing upgrades for Murano plugin."""
25
+
26
+    @test(depends_on_groups=["prepare_slaves_3"],
27
+          groups=["deploy_murano_and_plugin", "upgrade",
28
+                  "murano"])
29
+    @log_snapshot_after_test
30
+    def deploy_environment_with_murano_plugin(self):
31
+        """Upgrade Murano via plugin and run OSTF tests.
32
+
33
+        Scenario:
34
+            1. Deploy Fuel Cluster with one controller and Murano
35
+            2. Run OSTF
36
+            3. Upload plugin to master node
37
+            4. Install plugin
38
+            5. Activate plugin
39
+            6. Update cluster (Deploy changes)
40
+            7. Run OSTF
41
+
42
+        Duration 90m
43
+        Snapshot deploy_environment_with_murano_plugin
44
+        """
45
+
46
+        self.check_run("deploy_environment_with_murano_plugin")
47
+
48
+        self.env.revert_snapshot("ready_with_3_slaves")
49
+
50
+        self.helpers.create_cluster(name=self.__class__.__name__,
51
+                                    settings={'murano': True})
52
+
53
+        self.helpers.deploy_cluster({
54
+            'slave-01': ['controller'],
55
+            'slave-02': ['compute'],
56
+        })
57
+
58
+        self.helpers.run_ostf()
59
+
60
+        self.prepare_plugin()
61
+
62
+        self.activate_plugin()
63
+
64
+        self.helpers.deploy_cluster({
65
+            'slave-01': ['controller'],
66
+            'slave-02': ['compute'],
67
+        })
68
+
69
+        self.check_plugin_online()
70
+
71
+        self.helpers.run_ostf()
72
+
73
+        self.env.make_snapshot("deploy_environment_with_murano_plugin",
74
+                               is_make=True)
75
+
76
+    @test(depends_on_groups=["prepare_slaves_3"],
77
+          groups=["deploy_murano_and_plugin_add_role", "deploy",
78
+                  "murano"])
79
+    @log_snapshot_after_test
80
+    def deploy_murano_node_in_environment_with_murano(self):
81
+        """Upgrade Murano via plugin (adding murano-node) and run OSTF tests.
82
+
83
+        Scenario:
84
+            1. Deploy Fuel Cluster with one controller and Murano
85
+            2. Run OSTF
86
+            3. Upload plugin to master node
87
+            4. Install plugin
88
+            5. Activate plugin and add new node
89
+               with murano-node role to the cluster
90
+            6. Update cluster (Deploy changes)
91
+            7. Run OSTF
92
+
93
+        Duration 120m
94
+        Snapshot deploy_murano_node_in_environment_with_murano
95
+        """
96
+        self.check_run("deploy_murano_node_in_environment_with_murano")
97
+
98
+        self.env.revert_snapshot("ready_with_3_slaves")
99
+
100
+        self.helpers.create_cluster(name=self.__class__.__name__,
101
+                                    settings={'murano': True})
102
+
103
+        self.helpers.deploy_cluster({
104
+            'slave-01': ['controller'],
105
+            'slave-02': ['compute'],
106
+        })
107
+
108
+        self.helpers.run_ostf()
109
+
110
+        self.prepare_plugin()
111
+
112
+        self.activate_plugin()
113
+
114
+        self.helpers.deploy_cluster({
115
+            'slave-03': plugin_settings.role_name,
116
+        })
117
+
118
+        self.check_plugin_online()
119
+
120
+        self.helpers.run_ostf()
121
+
122
+        self.env.make_snapshot("deploy_murano_node_in_environment_with_murano",
123
+                               is_make=True)

+ 1
- 1
murano_plugin_tests/run_tests.py View File

@@ -41,10 +41,10 @@ class CloseSSHConnectionsPlugin(plugins.Plugin):
41 41
 def import_tests():
42 42
     from murano_plugin import test_failover  # noqa
43 43
     from murano_plugin import test_murano_plugin_bvt  # noqa
44
+    from murano_plugin import test_murano_plugin_update  # noqa
44 45
     from murano_plugin import test_post_install  # noqa
45 46
     from murano_plugin import test_system  # noqa
46 47
 
47
-
48 48
 def run_tests():
49 49
     from proboscis import TestProgram  # noqa
50 50
     import_tests()

Loading…
Cancel
Save