From e207c9b16867b3ad7af36c3d1942adf1e23e1e87 Mon Sep 17 00:00:00 2001 From: Andrey Setyaev Date: Fri, 17 Jun 2016 08:24:36 +0000 Subject: [PATCH] Add missed tests in test plan, fixes in tests. * Update test plan nsxv_disable_hosts, nsxv_smoke_add_compute * Add test nsxv_ha_edges * Switch test plan to version '3' * Fixes in tests: add_delete_nodes Change-Id: I64b0cbc499814ec7926029d24ff91a9b81ab67e4 --- doc/test/conf.py | 4 +- doc/test/source/test_suite_smoke.rst | 39 ++++++++++++ doc/test/source/test_suite_system.rst | 88 +++++++++++++++++++++++++++ plugin_test/tests/test_plugin_nsxv.py | 84 +++++++++++++++++++++---- 4 files changed, 202 insertions(+), 13 deletions(-) diff --git a/doc/test/conf.py b/doc/test/conf.py index 4163da5..065cf27 100644 --- a/doc/test/conf.py +++ b/doc/test/conf.py @@ -51,9 +51,9 @@ copyright = u'2015, Mirantis Inc.' # built documents. # # The short X.Y version. -version = '2.0.0' +version = '3.0.0' # The full version, including alpha/beta/rc tags. -release = '2.0-2.0.0-1' +release = '3.0-3.0.0-1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/test/source/test_suite_smoke.rst b/doc/test/source/test_suite_smoke.rst index 0e311bf..40233d8 100644 --- a/doc/test/source/test_suite_smoke.rst +++ b/doc/test/source/test_suite_smoke.rst @@ -285,6 +285,45 @@ Expected result Cluster should be deployed and all OSTF test cases should be passed. +Check option 'HA for edges' works correct +----------------------------------------- + + +ID +## + +nsxv_ha_edges + + +Description +########### + +Check that HA on edges functions properly. + + +Complexity +########## + +core + + +Steps +##### + + 1. Install NSXv plugin. + 2. Enable plugin on tab Settings -> NSXv plugin. + 3. Fill the form with corresponding values. + 4. Set checkbox 'Enable HA for NSX Edges'. + 5. Deploy cluster with one controller. + 6. Run OSTF. + + +Expected result +############### + +Cluster should be deployed and all OSTF test cases should be passed. + + Verify that nsxv driver configured properly after enabling NSXv plugin ---------------------------------------------------------------------- diff --git a/doc/test/source/test_suite_system.rst b/doc/test/source/test_suite_system.rst index b2883b3..f900a90 100644 --- a/doc/test/source/test_suite_system.rst +++ b/doc/test/source/test_suite_system.rst @@ -1116,3 +1116,91 @@ Request should return:: 2008-02-01 2008-09-01 2009-04-04 + + +Verify that instances could be launched on enabled compute host +--------------------------------------------------------------- + + +ID +## + +nsxv_disable_hosts + + +Description +########### + +Check instance creation on enabled cluster. + + +Complexity +########## + +core + + +Steps +##### + + 1. Setup cluster with 3 controllers and cinder-vmware + + compute-vmware role. + 2. Assign instances in each az. + 3. Disable one of compute host with vCenter cluster + (Admin -> Hypervisors). + 4. Create several instances in vcenter az. + 5. Check that instances were created on enabled compute host + (vcenter cluster). + 6. Disable second compute host with vCenter cluster and enable + first one. + 7. Create several instances in vcenter az. + 8. Check that instances were created on enabled compute host + (vcenter cluster). + + +Expected result +############### + +All instances work fine. + + +Check that settings about new cluster are placed in neutron config +------------------------------------------------------------------ + + +ID +## + +nsxv_smoke_add_compute + + +Description +########### + +Adding compute-vmware role and redeploy cluster with NSXv Plugin has effect in neutron configs. + + +Complexity +########## + +core + + +Steps +##### + + 1. Upload the plugin to master node. + 2. Create cluster and configure NSXv for that cluster. + 3. Provision three controller node. + 4. Deploy cluster with plugin. + 5. Get configured clusters morefid from neutron config. + 6. Add node with compute-vmware role. + 7. Redeploy cluster with new node. + 8. Get new configured clusters morefid from neutron config. + 9. Check new cluster added in neutron config. + + +Expected result +############### + +Clusters are reconfigured after compute-vmware has been added. diff --git a/plugin_test/tests/test_plugin_nsxv.py b/plugin_test/tests/test_plugin_nsxv.py index a4834f1..0dbc744 100644 --- a/plugin_test/tests/test_plugin_nsxv.py +++ b/plugin_test/tests/test_plugin_nsxv.py @@ -433,10 +433,12 @@ class TestNSXvPlugin(TestBasic): """Deploy a cluster with NSXv Plugin. Scenario: - 1. Upload the plugin to master node - 2. Create cluster and configure NSXv for that cluster - 3. Provision one controller node - 4. Deploy cluster with plugin + 1. Upload the plugin to master node. + 2. Create cluster. + 3. Provision one controller node. + 4. Configure NSXv for that cluster. + 5. Deploy cluster with plugin. + 6. Run 'smoke' OSTF. Duration 90 min @@ -485,7 +487,7 @@ class TestNSXvPlugin(TestBasic): groups=["nsxv_smoke_add_compute"]) @log_snapshot_after_test def nsxv_smoke_add_compute(self): - """Deploy a cluster with NSXv Plugin, after add compute-vmware role. + """Add compute-vmware role and redeploy cluster with NSXv Plugin. Scenario: 1. Upload the plugin to master node @@ -493,9 +495,9 @@ class TestNSXvPlugin(TestBasic): 3. Provision three controller node 4. Deploy cluster with plugin 5. Get configured clusters morefid from neutron config - 6. Add compute-vmware role + 6. Add node with compute-vmware role 7. Redeploy cluster with new node - 8. Get new configured clusters modrefid from neutron config + 8. Get new configured clusters morefid from neutron config 9. Check new cluster added in neutron config Duration 90 min @@ -559,6 +561,52 @@ class TestNSXvPlugin(TestBasic): set(old_configured_clusters[node]), "Clusters on node {0} not reconfigured".format(node)) + @test(depends_on=[SetupEnvironment.prepare_slaves_1], + groups=["nsxv_ha_edges"]) + @log_snapshot_after_test + def nsxv_ha_edges(self): + """Check that HA on edges functions properly. + + Scenario: + 1. Upload the plugin to master node. + 2. Create cluster and provision one controller node. + 3. Configure NSXv for that cluster. + 4. Set checkbox 'Enable HA for NSX Edges'. + 5. Deploy cluster. + 6. Run OSTF. + + Duration 90 min + + """ + self.env.revert_snapshot('ready_with_1_slaves') + + self.install_nsxv_plugin() + + # Configure cluster + settings = self.get_settings() + # Configure cluster + cluster_id = self.fuel_web.create_cluster( + name=self.__class__.__name__, + mode=DEPLOYMENT_MODE, + settings=settings, + configure_ssl=False) + + # Assign roles to nodes + self.fuel_web.update_nodes( + cluster_id, + {'slave-01': ['controller'], }) + + # Configure VMWare vCenter settings + self.fuel_web.vcenter_configure(cluster_id) + + self.enable_plugin(cluster_id, {'nsxv_edge_ha/value': True}) + + self.fuel_web.deploy_cluster_wait(cluster_id) + + self.fuel_web.run_ostf( + cluster_id=cluster_id, + test_sets=['smoke']) + @test(depends_on=[SetupEnvironment.prepare_slaves_9], groups=["nsxv_bvt"]) @log_snapshot_after_test @@ -635,6 +683,9 @@ class TestNSXvPlugin(TestBasic): 9. Remove node cinder-vmware. 10. Redeploy cluster. 11. Run OSTF. + 12. Remove node compute-vmware. + 13. Redeploy cluster. + 14. Run OSTF. Duration 3 hours @@ -694,6 +745,17 @@ class TestNSXvPlugin(TestBasic): self.fuel_web.run_ostf( cluster_id=cluster_id, test_sets=['smoke']) + # Remove node with compute-vmware role and redeploy cluster + self.fuel_web.update_nodes( + cluster_id, + {'slave-04': ['compute-vmware'], }, False, True) + self.fuel_web.vcenter_configure(cluster_id) + + self.fuel_web.deploy_cluster_wait(cluster_id) + + self.fuel_web.run_ostf( + cluster_id=cluster_id, test_sets=['smoke']) + @test(depends_on=[SetupEnvironment.prepare_slaves_9], groups=["nsxv_add_delete_controller"]) @log_snapshot_after_test @@ -2474,16 +2536,16 @@ class TestNSXvPlugin(TestBasic): Scenario: 1. Setup cluster with 3 controllers and cinder-vmware + compute-vmware role. - 2. Assign instances in each az. + 2. Assign instances in vcenter az. 3. Disable one of compute host with vCenter cluster (Admin -> Hypervisors). 4. Create several instances in vcenter az. 5. Check that instances were created on enabled compute host (vcenter cluster). - 7. Disable second compute host with vCenter cluster and enable + 6. Disable second compute host with vCenter cluster and enable first one. - 9. Create several instances in vcenter az. - 10. Check that instances were created on enabled compute host + 7. Create several instances in vcenter az. + 8. Check that instances were created on enabled compute host (vcenter cluster). Duration 1.5 hours