diff --git a/murano_plugin_tests/murano_plugin/api.py b/murano_plugin_tests/murano_plugin/api.py index 3b6a1bc..9791d93 100644 --- a/murano_plugin_tests/murano_plugin/api.py +++ b/murano_plugin_tests/murano_plugin/api.py @@ -38,6 +38,24 @@ class MuranoPluginApi(object): def __getattr__(self, item): return getattr(self.test, item) + @property + def only_controllers_ha(self): + """Return a dict mapping nodes to Fuel roles with HA.""" + return { + 'slave-01': ['controller'], + 'slave-02': ['controller'], + 'slave-03': ['controller'], + 'slave-04': ['compute', 'cinder'] + } + + @property + def only_controllers(self): + """Return a dict mapping nodes to Fuel roles non-HA.""" + return { + 'slave-01': ['controller'], + 'slave-02': ['compute', 'cinder'] + } + @property def base_nodes(self): """Return a dict mapping nodes to Fuel roles without HA.""" diff --git a/murano_plugin_tests/murano_plugin/test_murano_plugin_bvt.py b/murano_plugin_tests/murano_plugin/test_murano_plugin_bvt.py index a3be1f7..18de304 100644 --- a/murano_plugin_tests/murano_plugin/test_murano_plugin_bvt.py +++ b/murano_plugin_tests/murano_plugin/test_murano_plugin_bvt.py @@ -22,6 +22,76 @@ from murano_plugin_tests.murano_plugin import api class TestMuranoPluginBvt(api.MuranoPluginApi): """Class for bvt testing the Murano plugin.""" + @test(depends_on_groups=["prepare_slaves_3"], + groups=["deploy_murano_plugin_on_controller", "deploy", + "deploy_murano_bvt", "murano", "bvt"]) + @log_snapshot_after_test + def deploy_murano_plugin_on_controller(self): + """Deploy a cluster with the Murano plugin. + + Scenario: + 1. Upload the Murano plugin to the master node + 2. Install the plugin + 3. Create the cluster + 4. Add 1 node with controller role + 5. Add 1 node with compute and cinder roles + 6. Deploy the cluster + 7. Run OSTF + + Duration 90m + Snapshot deploy_murano_plugin + """ + self.check_run("deploy_murano_plugin") + + self.env.revert_snapshot("ready_with_3_slaves") + + self.prepare_plugin() + + self.helpers.create_cluster(name=self.__class__.__name__) + + self.activate_plugin() + + self.helpers.deploy_cluster(self.only_controllers) + + self.run_ostf(['sanity', 'smoke', 'tests_platform']) + + self.env.make_snapshot("deploy_murano_plugin", is_make=True) + + @test(depends_on_groups=["prepare_slaves_5"], + groups=["deploy_murano_plugin_on_controller_ha", "deploy", + "deploy_murano_bvt", "murano", "bvt"]) + @log_snapshot_after_test + def deploy_murano_plugin_on_controller_ha(self): + """Deploy a cluster with the Murano plugin. + + Scenario: + 1. Upload the Murano plugin to the master node + 2. Install the plugin + 3. Create the cluster + 4. Add 3 node with controller role + 5. Add 1 node with compute and cinder roles + 6. Deploy the cluster + 7. Run OSTF + + Duration 90m + Snapshot deploy_murano_plugin + """ + self.check_run("deploy_murano_plugin") + + self.env.revert_snapshot("ready_with_3_slaves") + + self.prepare_plugin() + + self.helpers.create_cluster(name=self.__class__.__name__) + + self.activate_plugin() + + self.helpers.deploy_cluster(self.only_controllers_ha) + + self.run_ostf(['sanity', 'smoke', 'tests_platform']) + + self.env.make_snapshot("deploy_murano_plugin", is_make=True) + @test(depends_on_groups=["prepare_slaves_3"], groups=["deploy_murano_plugin", "deploy", "deploy_murano_bvt", "murano", "bvt"]) diff --git a/murano_plugin_tests/murano_plugin/test_murano_plugin_update.py b/murano_plugin_tests/murano_plugin/test_murano_plugin_update.py index 7d14379..e806041 100644 --- a/murano_plugin_tests/murano_plugin/test_murano_plugin_update.py +++ b/murano_plugin_tests/murano_plugin/test_murano_plugin_update.py @@ -27,7 +27,7 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi): groups=["deploy_murano_and_plugin", "upgrade", "murano"]) @log_snapshot_after_test - def deploy_environment_with_murano_plugin(self): + def deploy_murano_plugin_in_environment_with_murano(self): """Upgrade Murano via plugin and run OSTF tests. Scenario: @@ -55,7 +55,7 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi): 'slave-02': ['compute'], }) - self.helpers.run_ostf() + self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform']) self.prepare_plugin() @@ -68,7 +68,7 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi): self.check_plugin_online() - self.helpers.run_ostf() + self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform']) self.env.make_snapshot("deploy_environment_with_murano_plugin", is_make=True) @@ -105,11 +105,11 @@ class TestMuranoPluginUpdate(api.MuranoPluginApi): 'slave-02': ['compute'], }) - self.helpers.run_ostf() + self.helpers.run_ostf(['sanity', 'smoke', 'tests_platform']) self.prepare_plugin() - self.activate_plugin() + self.activate_plugin(['sanity', 'smoke', 'tests_platform']) self.helpers.deploy_cluster({ 'slave-03': plugin_settings.role_name, diff --git a/murano_plugin_tests/run_tests.py b/murano_plugin_tests/run_tests.py index 659fba6..3c5afec 100644 --- a/murano_plugin_tests/run_tests.py +++ b/murano_plugin_tests/run_tests.py @@ -45,6 +45,7 @@ def import_tests(): from murano_plugin import test_post_install # noqa from murano_plugin import test_system # noqa + def run_tests(): from proboscis import TestProgram # noqa import_tests()