Add some functional and intefrations tests
- gcs_ceph - gcs_cinder_multirole - gcs_cinder_ceph_multirole - gcs_ceilometer - gcs_delete_add_controller - gcs_delete_add_compute - gcs_delete_add_cinder - gcs_delete_add_single_cinder - gcs_add_ceph Change scenario for gcs_bvt test Add rst for integration and functional tests Change-Id: I354727821b599ca98d19bea1b3fdfb97e826cc8a
This commit is contained in:
parent
926d2d7773
commit
19bf4d04b1
|
@ -219,5 +219,7 @@ An ordinary test cycle for each iteration consists of the following steps:
|
|||
6. Test scope
|
||||
-------------
|
||||
|
||||
.. include:: test_suite_somke_bvt.rst
|
||||
.. include:: test_suite_smoke_bvt.rst
|
||||
.. include:: test_gcs_gui.rst
|
||||
.. include:: test_suite_integration.rst
|
||||
.. include:: test_suite_functional.rst
|
|
@ -0,0 +1,225 @@
|
|||
==================
|
||||
Functional testing
|
||||
==================
|
||||
|
||||
|
||||
Check that Controller node can be deleted and added again
|
||||
---------------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_delete_add_controller
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Verify that a controller node can be deleted and added after deploying
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with 3 controller nodes at least
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
6. Delete a Controller node and deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Verify GCS plugin
|
||||
9. Add a node with "Controller" role and deploy changes
|
||||
10. Run OSTF tests
|
||||
11. Verify GCS plugin
|
||||
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Check that Compute node can be deleted and added again
|
||||
------------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_delete_add_compute
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Verify that a compute node can be deleted and added after deploying
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with 2 compute nodes at least
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
6. Delete a compute node and deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Verify GCS plugin
|
||||
9. Add a node with "compute" role and deploy changes
|
||||
10. Run OSTF tests
|
||||
11. Verify GCS plugin
|
||||
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Check that Cinder node can be deleted and added again
|
||||
-----------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_delete_add_cinder
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Verify that a cinder node can be deleted and added after deploying
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with 2 cinder nodes at least
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
6. Delete a cinder node and deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Verify GCS plugin
|
||||
9. Add a node with cinder role and deploy changes
|
||||
10. Run OSTF tests
|
||||
11. Verify GCS plugin
|
||||
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Check that the only cinder node can be deleted and added again
|
||||
--------------------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_delete_add_single_cinder
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Verify that the only cinder node can be deleted and added after deploying
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with 1 cinder node
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
6. Delete the cinder node and deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Add a node with cinder role and deploy changes
|
||||
9. Run OSTF tests
|
||||
10. Verify GCS plugin
|
||||
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Check that a Ceph-OSD node can be added again
|
||||
---------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_add_ceph
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Verify that a Ceph-OSD node can be added after deploying
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
advanced
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with Ceph-OSd as a storage backend
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
6. Add a node with Ceph-OSD role and deploy changes
|
||||
7. Run OSTF tests
|
||||
8. Verify GCS plugin
|
||||
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
===================
|
||||
Integration testing
|
||||
===================
|
||||
|
||||
|
||||
Deploy GCS plugin with Ceph-osd standalone nodes
|
||||
------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_ceph
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Check deploy an environment with Ceph-OSD standalone nodes
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
Core
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with 3 Ceph-OSD nodes at least
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Deploy with GCS plugin and cinder-multirole
|
||||
-------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_cinder_multirole
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Check deploy an environment with cinder-multirole
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
Core
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with controller+cinder and compute+cinder nodes
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Deploy with GCS plugin and cinder+Ceph-OSD multiroles
|
||||
-----------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_cinder_ceph_multirole
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Check deploy an environment with cinder+Ceph-OSD multirole
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
Core
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with controller+cinder+CephOSD and compute+cinder+CephOSD nodes
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
||||
|
||||
|
||||
Deploy an environment with GCS plugin and ceilometer
|
||||
----------------------------------------------------
|
||||
|
||||
|
||||
ID
|
||||
##
|
||||
|
||||
gcs_ceilometer
|
||||
|
||||
|
||||
Description
|
||||
###########
|
||||
|
||||
Check deploy an environment GCS plugin and ceilometer
|
||||
|
||||
|
||||
Complexity
|
||||
##########
|
||||
|
||||
Core
|
||||
|
||||
|
||||
Steps
|
||||
#####
|
||||
|
||||
1. Create an environment with ceilometer
|
||||
2. Enable and configure GCS plugin
|
||||
3. Deploy cluster with plugin
|
||||
4. Run OSTF tests
|
||||
5. Verify GCS plugin
|
||||
|
||||
|
||||
Expected results
|
||||
################
|
||||
|
||||
All steps must be completed successfully, without any errors.
|
|
@ -1 +1 @@
|
|||
Subproject commit c8642a7c1d49c9c69eb934171ca3d63c0825d430
|
||||
Subproject commit e1ae7be2b30e1e27d0b7e6a3a2ae98909734044b
|
|
@ -47,8 +47,10 @@ class CloseSSHConnectionsPlugin(Plugin):
|
|||
|
||||
def import_tests():
|
||||
"""Import test suite of project."""
|
||||
from tests import test_gcs_smoke_bvt
|
||||
from tests import test_smoke_bvt
|
||||
from tests import test_gcs_gui
|
||||
from tests import test_integration
|
||||
from tests import test_functional
|
||||
|
||||
|
||||
def run_tests():
|
||||
|
|
|
@ -0,0 +1,559 @@
|
|||
# Copyright 2016 Mirantis, Inc.
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Module with set of basic test cases."""
|
||||
|
||||
from proboscis import test
|
||||
|
||||
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
||||
from helpers.gcs_base import GcsTestBase
|
||||
from helpers import gcs_settings
|
||||
from tests.test_plugin_check import TestPluginCheck
|
||||
|
||||
|
||||
@test(groups=["gcs_functional_tests"])
|
||||
class GcsTestClass(GcsTestBase):
|
||||
"""GcsTestBase.""" # TODO(unknown) documentation
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["gcs_delete_add_controller"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_delete_add_controller(self):
|
||||
"""Delete a controller node and add again.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 1 controller
|
||||
* 2 controller+ceph-osd
|
||||
* 1 compute+ceph-osd
|
||||
* 1 compute
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
8. Delete node with controller role
|
||||
9. Deploy changes
|
||||
10. Run OSTF
|
||||
11. Verify GCS plugin
|
||||
12. Add a node with controller role
|
||||
13. Deploy changes
|
||||
14. Run OSTF
|
||||
15. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={
|
||||
'images_ceph': True,
|
||||
'volumes_ceph': True,
|
||||
'ephemeral_ceph': True,
|
||||
'objects_ceph': True,
|
||||
'volumes_lvm': False
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller'],
|
||||
'slave-02': ['controller', 'ceph-osd'],
|
||||
'slave-03': ['ceph-osd', 'controller'],
|
||||
'slave-04': ['ceph-osd', 'compute'],
|
||||
'slave-05': ['compute'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(8)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-01': ['controller']},
|
||||
pending_addition=False, pending_deletion=True)
|
||||
|
||||
self.show_step(9)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(10)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(11)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(12)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-01': ['controller']})
|
||||
|
||||
self.show_step(13)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(14)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(15)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_3],
|
||||
groups=["gcs_delete_add_compute"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_delete_add_compute(self):
|
||||
"""Delete a compute node and add again.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 1 controller
|
||||
* 1 compute+cinder
|
||||
* 1 compute
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
8. Delete a node with compute role
|
||||
9. Deploy changes
|
||||
10. Run OSTF
|
||||
11. Verify GCS plugin
|
||||
12. Add a node with compute role
|
||||
13. Deploy changes
|
||||
14. Run OSTF
|
||||
15. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_3_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={
|
||||
"net_provider": 'neutron',
|
||||
"net_segment_type": 'tun',
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller'],
|
||||
'slave-02': ['compute', 'cinder'],
|
||||
'slave-03': ['compute'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(8)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-03': ['compute']},
|
||||
pending_addition=False, pending_deletion=True)
|
||||
|
||||
self.show_step(9)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(10)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(11)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(12)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-03': ['compute']})
|
||||
|
||||
self.show_step(13)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(14)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(15)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_3],
|
||||
groups=["gcs_delete_add_cinder"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_delete_add_cinder(self):
|
||||
"""Delete a cinder node and add again.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 1 controller+cinder
|
||||
* 1 compute+cinder
|
||||
* 1 cinder
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
8. Delete a node with cinder role
|
||||
9. Deploy changes
|
||||
10. Run OSTF
|
||||
11. Verify GCS plugin
|
||||
12. Add a node with cinder role
|
||||
13. Deploy changes
|
||||
14. Run OSTF
|
||||
15. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_3_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller', 'cinder'],
|
||||
'slave-02': ['compute', 'cinder'],
|
||||
'slave-03': ['cinder'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(8)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-03': ['cinder']},
|
||||
pending_addition=False, pending_deletion=True)
|
||||
|
||||
self.show_step(9)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(10)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(11)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(12)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-03': ['cinder']})
|
||||
|
||||
self.show_step(13)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(14)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(15)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_3],
|
||||
groups=["gcs_delete_add_single_cinder"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_delete_add_single_cinder(self):
|
||||
"""Delete the only cinder node and add again.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 1 controller
|
||||
* 1 compute
|
||||
* 1 cinder
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
8. Delete a node with cinder role
|
||||
9. Deploy changes
|
||||
10. Run OSTF
|
||||
11. Add a node with cinder role
|
||||
12. Deploy changes
|
||||
13. Run OSTF
|
||||
14. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_3_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={
|
||||
"net_provider": 'neutron',
|
||||
"net_segment_type": 'tun',
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller'],
|
||||
'slave-02': ['compute'],
|
||||
'slave-03': ['cinder'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(8)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-03': ['cinder']},
|
||||
pending_addition=False, pending_deletion=True)
|
||||
|
||||
self.show_step(9)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(10)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(11)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-03': ['cinder']})
|
||||
|
||||
self.show_step(12)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(13)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
should_fail=1,
|
||||
failed_test_name=['Check that required services are running'],
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(14)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["gcs_add_ceph"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_add_ceph(self):
|
||||
"""Adding a ceph-osd node.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 3 controller+ceph-osd
|
||||
* 1 compute+ceph-osd
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
8. Add a node with compute+ceph-osd roles
|
||||
9. Deploy changes
|
||||
10. Run OSTF
|
||||
11. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={
|
||||
'images_ceph': True,
|
||||
'volumes_ceph': True,
|
||||
'ephemeral_ceph': True,
|
||||
'objects_ceph': True,
|
||||
'volumes_lvm': False,
|
||||
"net_provider": 'neutron',
|
||||
"net_segment_type": 'tun',
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller', 'ceph-osd'],
|
||||
'slave-02': ['controller', 'ceph-osd'],
|
||||
'slave-03': ['controller', 'ceph-osd'],
|
||||
'slave-04': ['ceph-osd', 'compute'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
self.show_step(8)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id, {'slave-05': ['ceph-osd', 'compute']})
|
||||
|
||||
self.show_step(9)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(10)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(11)
|
||||
TestPluginCheck(self).plugin_check()
|
|
@ -0,0 +1,286 @@
|
|||
# Copyright 2016 Mirantis, Inc.
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Module with set of basic test cases."""
|
||||
|
||||
from proboscis import test
|
||||
|
||||
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
||||
from helpers.gcs_base import GcsTestBase
|
||||
from helpers import gcs_settings
|
||||
from tests.test_plugin_check import TestPluginCheck
|
||||
|
||||
|
||||
@test(groups=["gcs_integration_tests"])
|
||||
class GcsTestClass(GcsTestBase):
|
||||
"""GcsTestBase.""" # TODO(unknown) documentation
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["gcs_ceph"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_ceph(self):
|
||||
"""Deploy with GCS plugin and CEPH standalone roles.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment with tunneling segmentation
|
||||
3. Add a node with controller role
|
||||
4. Add a node with compute role
|
||||
5. Add 3 nodes with Ceph-OSD roles
|
||||
6. Configure GCS plugin
|
||||
7. Deploy the cluster
|
||||
8. Run OSTF
|
||||
9. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={
|
||||
"net_provider": 'neutron',
|
||||
"net_segment_type": 'tun',
|
||||
'images_ceph': True,
|
||||
'volumes_ceph': True,
|
||||
'ephemeral_ceph': True,
|
||||
'objects_ceph': True,
|
||||
'volumes_lvm': False
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.show_step(4)
|
||||
self.show_step(5)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller'],
|
||||
'slave-02': ['compute'],
|
||||
'slave-03': ['ceph-osd'],
|
||||
'slave-04': ['ceph-osd'],
|
||||
'slave-05': ['ceph-osd'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(7)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(8)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity'])
|
||||
|
||||
self.show_step(9)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["gcs_cinder_multirole"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_cinder_multirole(self):
|
||||
"""Deploy with GCS plugin and cinder multirole.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment with tunneling segmentation
|
||||
3. Add 3 nodes with controller+cinder roles
|
||||
4. Add 2 nodes with compute+cinder roles
|
||||
5. Configure GCS plugin
|
||||
6. Deploy the cluster
|
||||
7. Run OSTF
|
||||
8. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={
|
||||
"net_provider": 'neutron',
|
||||
"net_segment_type": 'tun',
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller', 'cinder'],
|
||||
'slave-02': ['controller', 'cinder'],
|
||||
'slave-03': ['controller', 'cinder'],
|
||||
'slave-04': ['compute', 'cinder'],
|
||||
'slave-05': ['compute', 'cinder'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(7)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(8)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["gcs_cinder_ceph_multirole"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_cinder_ceph_multirole(self):
|
||||
"""Deploy with GCS plugin and cinder+Ceph-OSD multiroles.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 1 controller + ceph + cinder
|
||||
* 1 controller + ceph
|
||||
* 1 controller + cinder
|
||||
* 1 compute + ceph + cinder
|
||||
* 1 compute
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={'images_ceph': True}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller', 'cinder', 'ceph-osd'],
|
||||
'slave-02': ['controller', 'cinder'],
|
||||
'slave-03': ['controller', 'ceph-osd'],
|
||||
'slave-04': ['compute', 'cinder', 'ceph-osd'],
|
||||
'slave-05': ['compute', 'cinder'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
||||
|
||||
@test(depends_on=[SetupEnvironment.prepare_slaves_5],
|
||||
groups=["gcs_ceilometer"])
|
||||
@log_snapshot_after_test
|
||||
def gcs_ceilometer(self):
|
||||
"""Deploy an environment with GCS plugin and ceilometer.
|
||||
|
||||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add following nodes:
|
||||
* 1 controller + mongo-db
|
||||
* 1 mongo-db
|
||||
* 1 cinder + mongo-db
|
||||
* 2 compute
|
||||
4. Configure GCS plugin
|
||||
5. Deploy the cluster
|
||||
6. Run OSTF
|
||||
7. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
self.show_step(1)
|
||||
self.install_plugin()
|
||||
|
||||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
settings={'ceilometer': True}
|
||||
)
|
||||
|
||||
self.show_step(3)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller', 'mongo'],
|
||||
'slave-02': ['mongo'],
|
||||
'slave-03': ['cinder', 'mongo'],
|
||||
'slave-04': ['compute'],
|
||||
'slave-05': ['compute'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'tests_platform'])
|
||||
|
||||
self.show_step(7)
|
||||
TestPluginCheck(self).plugin_check()
|
|
@ -57,16 +57,18 @@ class TestPluginCheck(object):
|
|||
"""
|
||||
os_cinder = self.os_conn.cinder
|
||||
os_volumes = os_cinder.volumes
|
||||
logger.info('#'*10 + ' Run check_create_backup_and_restore ' + '#'*10)
|
||||
logger.info('#' * 10 +
|
||||
' Run check_create_backup_and_restore ' +
|
||||
'#' * 10)
|
||||
logger.info('Create volume ...')
|
||||
volume = os_volumes.create(size=1)
|
||||
wait(lambda: os_volumes.get(volume.id).status == 'available',
|
||||
timeout=60, timeout_msg='Volume is not created')
|
||||
timeout=120, timeout_msg='Volume is not created')
|
||||
|
||||
logger.info('Create backup ...')
|
||||
backup = os_cinder.backups.create(volume.id)
|
||||
wait(lambda: os_cinder.backups.get(backup.id).status == 'available',
|
||||
timeout=120, timeout_msg='Backup is not created')
|
||||
timeout=600, timeout_msg='Backup is not created')
|
||||
|
||||
logger.info('Verify type of backup ...')
|
||||
assert_true(backup.container == options['backup_gcs_bucket/value'],
|
||||
|
@ -75,15 +77,15 @@ class TestPluginCheck(object):
|
|||
logger.info('Restore volume from backup ...')
|
||||
restore = os_cinder.restores.restore(backup.id)
|
||||
wait(lambda: os_volumes.get(restore.volume_id).status == 'available',
|
||||
timeout=120, timeout_msg='Backup is not restored')
|
||||
timeout=600, timeout_msg='Backup is not restored')
|
||||
|
||||
logger.info('Delete backup ...')
|
||||
os_cinder.backups.delete(backup.id)
|
||||
wait(lambda: len(os_cinder.backups.list()) == 0,
|
||||
timeout=120, timeout_msg='Backup is not deleted')
|
||||
timeout=600, timeout_msg='Backup is not deleted')
|
||||
|
||||
logger.info('Delete volumes ...')
|
||||
os_volumes.delete(restore.volume_id)
|
||||
os_volumes.delete(volume.id)
|
||||
wait(lambda: len(os_volumes.list()) == 0,
|
||||
timeout=120, timeout_msg='Volumes are not deleted')
|
||||
timeout=600, timeout_msg='Volumes are not deleted')
|
||||
|
|
|
@ -25,7 +25,7 @@ from fuelweb_test import logger
|
|||
from tests.test_plugin_check import TestPluginCheck
|
||||
|
||||
|
||||
@test(groups=["test_gcs_all"])
|
||||
@test(groups=["gcs_smoke_bvt_tests"])
|
||||
class GcsTestClass(GcsTestBase):
|
||||
"""GcsTestBase.""" # TODO(unknown) documentation
|
||||
|
||||
|
@ -91,13 +91,12 @@ class GcsTestClass(GcsTestBase):
|
|||
Scenario:
|
||||
1. Install GCS plugin
|
||||
2. Create an environment
|
||||
3. Add 3 nodes with controller role
|
||||
4. Add a node with compute role
|
||||
5. Add a node with cinder role
|
||||
6. Configure GCS plugin
|
||||
7. Deploy the cluster
|
||||
8. Run OSTF
|
||||
9. Verify GCS plugin
|
||||
3. Add 3 nodes with controller+ceph-osd roles
|
||||
4. Add 2 nodes with compute+ceph-osd role
|
||||
5. Configure GCS plugin
|
||||
6. Deploy the cluster
|
||||
7. Run OSTF
|
||||
8. Verify GCS plugin
|
||||
"""
|
||||
self.env.revert_snapshot("ready_with_5_slaves")
|
||||
|
||||
|
@ -107,38 +106,44 @@ class GcsTestClass(GcsTestBase):
|
|||
self.show_step(2)
|
||||
cluster_id = self.fuel_web.create_cluster(
|
||||
name=self.__class__.__name__,
|
||||
mode=DEPLOYMENT_MODE)
|
||||
|
||||
self.show_step(3)
|
||||
self.show_step(4)
|
||||
self.show_step(5)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller'],
|
||||
'slave-02': ['controller'],
|
||||
'slave-03': ['controller'],
|
||||
'slave-04': ['compute'],
|
||||
'slave-05': ['cinder']
|
||||
settings={
|
||||
'images_ceph': True,
|
||||
'volumes_ceph': True,
|
||||
'ephemeral_ceph': True,
|
||||
'objects_ceph': True,
|
||||
'volumes_lvm': False
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(6)
|
||||
self.show_step(3)
|
||||
self.show_step(4)
|
||||
self.fuel_web.update_nodes(
|
||||
cluster_id,
|
||||
{
|
||||
'slave-01': ['controller', 'ceph-osd'],
|
||||
'slave-02': ['controller', 'ceph-osd'],
|
||||
'slave-03': ['controller', 'ceph-osd'],
|
||||
'slave-04': ['compute', 'ceph-osd'],
|
||||
'slave-05': ['compute', 'ceph-osd'],
|
||||
}
|
||||
)
|
||||
|
||||
self.show_step(5)
|
||||
self.fuel_web.update_plugin_settings(cluster_id,
|
||||
gcs_settings.plugin_name,
|
||||
gcs_settings.plugin_version,
|
||||
gcs_settings.options)
|
||||
|
||||
self.show_step(7)
|
||||
self.show_step(6)
|
||||
self.fuel_web.deploy_cluster_wait(
|
||||
cluster_id,
|
||||
check_services=False
|
||||
)
|
||||
|
||||
self.show_step(8)
|
||||
self.show_step(7)
|
||||
self.fuel_web.run_ostf(
|
||||
cluster_id=cluster_id,
|
||||
test_sets=['smoke', 'sanity', 'ha'])
|
||||
|
||||
self.show_step(9)
|
||||
self.show_step(8)
|
||||
TestPluginCheck(self).plugin_check()
|
Loading…
Reference in New Issue