Merge "Add acceptance tests for separate services"
This commit is contained in:
commit
8f8c4d9a5f
@ -467,6 +467,11 @@ Test for separate keystone service
|
|||||||
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_keystone
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_keystone
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
Test for separate keystone service and ceph
|
||||||
|
-------------------------------------------
|
||||||
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_keystone_ceph
|
||||||
|
:members:
|
||||||
|
|
||||||
Test for separate horizon service
|
Test for separate horizon service
|
||||||
---------------------------------
|
---------------------------------
|
||||||
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_horizon
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_horizon
|
||||||
@ -477,6 +482,11 @@ Test for separate mysql service
|
|||||||
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_db
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_db
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
Test for separate mysql service and ceph
|
||||||
|
----------------------------------------
|
||||||
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_db_ceph
|
||||||
|
:members:
|
||||||
|
|
||||||
Test for separate multiroles
|
Test for separate multiroles
|
||||||
----------------------------
|
----------------------------
|
||||||
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_multiroles
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_multiroles
|
||||||
@ -487,6 +497,11 @@ Test for separate rabbitmq service
|
|||||||
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_rabbitmq
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_rabbitmq
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
Test for separate rabbitmq service and ceph
|
||||||
|
-------------------------------------------
|
||||||
|
.. automodule:: fuelweb_test.tests.tests_separate_services.test_separate_rabbitmq_ceph
|
||||||
|
:members:
|
||||||
|
|
||||||
Template based tests
|
Template based tests
|
||||||
--------------------
|
--------------------
|
||||||
.. automodule:: fuelweb_test.actions_tests
|
.. automodule:: fuelweb_test.actions_tests
|
||||||
|
@ -85,12 +85,16 @@ def import_tests():
|
|||||||
from tests import test_reduced_footprint # noqa
|
from tests import test_reduced_footprint # noqa
|
||||||
from tests.tests_deployments.tests_neutron_vlan import test_ha_vlan_group_1 # noqa
|
from tests.tests_deployments.tests_neutron_vlan import test_ha_vlan_group_1 # noqa
|
||||||
from tests.tests_deployments.tests_neutron_vlan import test_ha_vlan_group_2 # noqa
|
from tests.tests_deployments.tests_neutron_vlan import test_ha_vlan_group_2 # noqa
|
||||||
|
from tests.tests_deployments.tests_neutron_vlan import test_ha_vlan_group_2 # noqa
|
||||||
from tests.tests_security import test_run_nessus # noqa
|
from tests.tests_security import test_run_nessus # noqa
|
||||||
from tests.tests_separate_services import test_separate_db # noqa
|
from tests.tests_separate_services import test_separate_db # noqa
|
||||||
from tests.tests_separate_services import test_separate_horizon # noqa
|
from tests.tests_separate_services import test_separate_horizon # noqa
|
||||||
from tests.tests_separate_services import test_separate_keystone # noqa
|
from tests.tests_separate_services import test_separate_keystone # noqa
|
||||||
from tests.tests_separate_services import test_separate_multiroles # noqa
|
from tests.tests_separate_services import test_separate_multiroles # noqa
|
||||||
from tests.tests_separate_services import test_separate_rabbitmq # noqa
|
from tests.tests_separate_services import test_separate_rabbitmq # noqa
|
||||||
|
from tests.tests_separate_services import test_separate_db_ceph # noqa
|
||||||
|
from tests.tests_separate_services import test_separate_keystone_ceph # noqa
|
||||||
|
from tests.tests_separate_services import test_separate_rabbitmq_ceph # noqa
|
||||||
from tests import test_clone_env # noqa
|
from tests import test_clone_env # noqa
|
||||||
from tests import test_node_reassignment # noqa
|
from tests import test_node_reassignment # noqa
|
||||||
from tests import test_os_upgrade # noqa
|
from tests import test_os_upgrade # noqa
|
||||||
|
@ -0,0 +1,120 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from proboscis.asserts import assert_true
|
||||||
|
from proboscis import test
|
||||||
|
|
||||||
|
from fuelweb_test.helpers import checkers
|
||||||
|
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||||
|
from fuelweb_test import settings
|
||||||
|
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
||||||
|
from fuelweb_test.tests.base_test_case import TestBasic
|
||||||
|
|
||||||
|
|
||||||
|
@test(groups=["thread_separate_services_ceph"])
|
||||||
|
class SeparateDbCeph(TestBasic):
|
||||||
|
"""SeparateDbCeph""" # TODO documentation
|
||||||
|
|
||||||
|
@test(depends_on=[SetupEnvironment.prepare_slaves_9],
|
||||||
|
groups=["separate_db_ceph_service"])
|
||||||
|
@log_snapshot_after_test
|
||||||
|
def separate_db_ceph_service(self):
|
||||||
|
"""Deploy cluster with 3 separate database roles and ceph
|
||||||
|
|
||||||
|
Scenario:
|
||||||
|
1. Create cluster
|
||||||
|
2. Add 3 nodes with controller role
|
||||||
|
3. Add 3 nodes with database role
|
||||||
|
4. Add 1 compute and 2 ceph nodes
|
||||||
|
5. Choose ceph for volumes, images, ephemeral and objects
|
||||||
|
6. Verify networks
|
||||||
|
7. Deploy the cluster
|
||||||
|
8. Verify networks
|
||||||
|
9. Run OSTF
|
||||||
|
|
||||||
|
Duration 120m
|
||||||
|
Snapshot separate_db_ceph_service
|
||||||
|
"""
|
||||||
|
self.check_run("separate_db_ceph_service")
|
||||||
|
self.env.revert_snapshot("ready_with_9_slaves")
|
||||||
|
|
||||||
|
with self.env.d_env.get_admin_remote() as remote:
|
||||||
|
|
||||||
|
# copy plugins to the master node
|
||||||
|
|
||||||
|
checkers.upload_tarball(
|
||||||
|
remote,
|
||||||
|
settings.SEPARATE_SERVICE_DB_PLUGIN_PATH, "/var")
|
||||||
|
|
||||||
|
# install plugins
|
||||||
|
|
||||||
|
checkers.install_plugin_check_code(
|
||||||
|
remote,
|
||||||
|
plugin=os.path.basename(
|
||||||
|
settings.SEPARATE_SERVICE_DB_PLUGIN_PATH))
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'volumes_lvm': False,
|
||||||
|
'volumes_ceph': True,
|
||||||
|
'images_ceph': True,
|
||||||
|
'ephemeral_ceph': True,
|
||||||
|
'objects_ceph': True,
|
||||||
|
'tenant': 'separatedbceph',
|
||||||
|
'user': 'separatedbceph',
|
||||||
|
'password': 'separatedbceph',
|
||||||
|
"net_provider": 'neutron',
|
||||||
|
"net_segment_type": settings.NEUTRON_SEGMENT['tun'],
|
||||||
|
}
|
||||||
|
|
||||||
|
cluster_id = self.fuel_web.create_cluster(
|
||||||
|
name=self.__class__.__name__,
|
||||||
|
mode=settings.DEPLOYMENT_MODE,
|
||||||
|
settings=data)
|
||||||
|
|
||||||
|
plugin_name = 'detach-database'
|
||||||
|
msg = "Plugin couldn't be enabled. Check plugin version. Test aborted"
|
||||||
|
assert_true(
|
||||||
|
self.fuel_web.check_plugin_exists(cluster_id, plugin_name),
|
||||||
|
msg)
|
||||||
|
options = {'metadata/enabled': True}
|
||||||
|
self.fuel_web.update_plugin_data(cluster_id, plugin_name, options)
|
||||||
|
|
||||||
|
self.fuel_web.update_nodes(
|
||||||
|
cluster_id,
|
||||||
|
{
|
||||||
|
'slave-01': ['controller'],
|
||||||
|
'slave-02': ['controller'],
|
||||||
|
'slave-03': ['controller'],
|
||||||
|
'slave-04': ['standalone-database'],
|
||||||
|
'slave-05': ['standalone-database'],
|
||||||
|
'slave-06': ['standalone-database'],
|
||||||
|
'slave-07': ['compute'],
|
||||||
|
'slave-08': ['ceph-osd'],
|
||||||
|
'slave-09': ['ceph-osd']
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
self.fuel_web.verify_network(cluster_id)
|
||||||
|
|
||||||
|
# Cluster deploy
|
||||||
|
self.fuel_web.deploy_cluster_wait(cluster_id)
|
||||||
|
|
||||||
|
self.fuel_web.verify_network(cluster_id)
|
||||||
|
|
||||||
|
self.fuel_web.run_ostf(
|
||||||
|
cluster_id=cluster_id)
|
||||||
|
|
||||||
|
self.env.make_snapshot("separate_db_ceph_service")
|
@ -0,0 +1,129 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from proboscis import test
|
||||||
|
from proboscis.asserts import assert_true
|
||||||
|
|
||||||
|
from fuelweb_test.helpers import checkers
|
||||||
|
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||||
|
from fuelweb_test import settings
|
||||||
|
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
||||||
|
from fuelweb_test.tests.base_test_case import TestBasic
|
||||||
|
|
||||||
|
|
||||||
|
@test(groups=["thread_separate_services_ceph"])
|
||||||
|
class SeparateKeystoneCeph(TestBasic):
|
||||||
|
"""SeparateKeystoneCeph""" # TODO documentation
|
||||||
|
|
||||||
|
@test(depends_on=[SetupEnvironment.prepare_slaves_9],
|
||||||
|
groups=["separate_keystone_ceph_service"])
|
||||||
|
@log_snapshot_after_test
|
||||||
|
def separate_keystone_ceph_service(self):
|
||||||
|
"""Deploy cluster with 3 separate keystone roles and ceph
|
||||||
|
|
||||||
|
Scenario:
|
||||||
|
1. Create cluster
|
||||||
|
2. Add 3 nodes with controller role
|
||||||
|
3. Add 3 nodes with keystone+database role
|
||||||
|
4. Add 1 compute and 2 ceph nodes
|
||||||
|
5. Verify networks
|
||||||
|
6. Deploy the cluster
|
||||||
|
7. Verify networks
|
||||||
|
8. Run OSTF
|
||||||
|
|
||||||
|
Duration 120m
|
||||||
|
Snapshot separate_keystone_ceph_service
|
||||||
|
"""
|
||||||
|
self.check_run("separate_keystone_ceph_service")
|
||||||
|
self.env.revert_snapshot("ready_with_9_slaves")
|
||||||
|
|
||||||
|
with self.env.d_env.get_admin_remote() as remote:
|
||||||
|
|
||||||
|
# copy plugins to the master node
|
||||||
|
|
||||||
|
checkers.upload_tarball(
|
||||||
|
remote,
|
||||||
|
settings.SEPARATE_SERVICE_DB_PLUGIN_PATH, "/var")
|
||||||
|
|
||||||
|
checkers.upload_tarball(
|
||||||
|
remote,
|
||||||
|
settings.SEPARATE_SERVICE_KEYSTONE_PLUGIN_PATH, "/var")
|
||||||
|
|
||||||
|
# install plugins
|
||||||
|
|
||||||
|
checkers.install_plugin_check_code(
|
||||||
|
remote,
|
||||||
|
plugin=os.path.basename(
|
||||||
|
settings.SEPARATE_SERVICE_DB_PLUGIN_PATH))
|
||||||
|
|
||||||
|
checkers.install_plugin_check_code(
|
||||||
|
remote,
|
||||||
|
plugin=os.path.basename(
|
||||||
|
settings.SEPARATE_SERVICE_KEYSTONE_PLUGIN_PATH))
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'volumes_lvm': False,
|
||||||
|
'volumes_ceph': True,
|
||||||
|
'images_ceph': True,
|
||||||
|
'ephemeral_ceph': True,
|
||||||
|
'objects_ceph': True,
|
||||||
|
'tenant': 'separatekeystoneceph',
|
||||||
|
'user': 'separatekeystoneceph',
|
||||||
|
'password': 'separatekeystoneceph',
|
||||||
|
"net_provider": 'neutron',
|
||||||
|
"net_segment_type": settings.NEUTRON_SEGMENT['tun'],
|
||||||
|
}
|
||||||
|
|
||||||
|
cluster_id = self.fuel_web.create_cluster(
|
||||||
|
name=self.__class__.__name__,
|
||||||
|
mode=settings.DEPLOYMENT_MODE,
|
||||||
|
settings=data)
|
||||||
|
|
||||||
|
plugin_names = ['detach-database', 'detach-keystone']
|
||||||
|
msg = "Plugin couldn't be enabled. Check plugin version. Test aborted"
|
||||||
|
for plugin_name in plugin_names:
|
||||||
|
assert_true(
|
||||||
|
self.fuel_web.check_plugin_exists(cluster_id, plugin_name),
|
||||||
|
msg)
|
||||||
|
options = {'metadata/enabled': True}
|
||||||
|
self.fuel_web.update_plugin_data(cluster_id, plugin_name, options)
|
||||||
|
|
||||||
|
self.fuel_web.update_nodes(
|
||||||
|
cluster_id,
|
||||||
|
{
|
||||||
|
'slave-01': ['controller'],
|
||||||
|
'slave-02': ['controller'],
|
||||||
|
'slave-03': ['controller'],
|
||||||
|
'slave-04': ['standalone-database', 'standalone-keystone'],
|
||||||
|
'slave-05': ['standalone-database', 'standalone-keystone'],
|
||||||
|
'slave-06': ['standalone-database', 'standalone-keystone'],
|
||||||
|
'slave-07': ['compute'],
|
||||||
|
'slave-08': ['ceph-osd'],
|
||||||
|
'slave-09': ['ceph-osd']
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
self.fuel_web.verify_network(cluster_id)
|
||||||
|
|
||||||
|
# Cluster deploy
|
||||||
|
self.fuel_web.deploy_cluster_wait(cluster_id)
|
||||||
|
|
||||||
|
self.fuel_web.verify_network(cluster_id)
|
||||||
|
|
||||||
|
self.fuel_web.run_ostf(
|
||||||
|
cluster_id=cluster_id)
|
||||||
|
|
||||||
|
self.env.make_snapshot("separate_keystone_ceph_service")
|
@ -0,0 +1,119 @@
|
|||||||
|
# Copyright 2015 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.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from proboscis.asserts import assert_true
|
||||||
|
from proboscis import test
|
||||||
|
|
||||||
|
from fuelweb_test.helpers import checkers
|
||||||
|
from fuelweb_test.helpers.decorators import log_snapshot_after_test
|
||||||
|
from fuelweb_test import settings
|
||||||
|
from fuelweb_test.tests.base_test_case import SetupEnvironment
|
||||||
|
from fuelweb_test.tests.base_test_case import TestBasic
|
||||||
|
|
||||||
|
|
||||||
|
@test(groups=["thread_separate_services_ceph"])
|
||||||
|
class SeparateRabbitCeph(TestBasic):
|
||||||
|
"""SeparateRabbitCeph""" # TODO documentation
|
||||||
|
|
||||||
|
@test(depends_on=[SetupEnvironment.prepare_slaves_9],
|
||||||
|
groups=["separate_rabbit_ceph_service"])
|
||||||
|
@log_snapshot_after_test
|
||||||
|
def separate_rabbit_ceph_service(self):
|
||||||
|
"""Deploy cluster with 3 separate rabbit roles and ceph
|
||||||
|
|
||||||
|
Scenario:
|
||||||
|
1. Create cluster
|
||||||
|
2. Add 3 nodes with controller role
|
||||||
|
3. Add 3 nodes with rabbit role
|
||||||
|
4. Add 1 compute and 2 ceph nodes
|
||||||
|
5. Verify networks
|
||||||
|
6. Deploy the cluster
|
||||||
|
7. Verify networks
|
||||||
|
8. Run OSTF
|
||||||
|
|
||||||
|
Duration 120m
|
||||||
|
Snapshot separate_rabbit_ceph_service
|
||||||
|
"""
|
||||||
|
self.check_run("separate_rabbit_ceph_service")
|
||||||
|
self.env.revert_snapshot("ready_with_9_slaves")
|
||||||
|
|
||||||
|
with self.env.d_env.get_admin_remote() as remote:
|
||||||
|
|
||||||
|
# copy plugins to the master node
|
||||||
|
|
||||||
|
checkers.upload_tarball(
|
||||||
|
remote,
|
||||||
|
settings.SEPARATE_SERVICE_RABBIT_PLUGIN_PATH, "/var")
|
||||||
|
|
||||||
|
# install plugins
|
||||||
|
|
||||||
|
checkers.install_plugin_check_code(
|
||||||
|
remote,
|
||||||
|
plugin=os.path.basename(
|
||||||
|
settings.SEPARATE_SERVICE_RABBIT_PLUGIN_PATH))
|
||||||
|
|
||||||
|
data = {
|
||||||
|
'volumes_lvm': False,
|
||||||
|
'volumes_ceph': True,
|
||||||
|
'images_ceph': True,
|
||||||
|
'ephemeral_ceph': True,
|
||||||
|
'objects_ceph': True,
|
||||||
|
'tenant': 'separaterabbitceph',
|
||||||
|
'user': 'separaterabbitceph',
|
||||||
|
'password': 'separaterabbitceph',
|
||||||
|
"net_provider": 'neutron',
|
||||||
|
"net_segment_type": settings.NEUTRON_SEGMENT['tun'],
|
||||||
|
}
|
||||||
|
|
||||||
|
cluster_id = self.fuel_web.create_cluster(
|
||||||
|
name=self.__class__.__name__,
|
||||||
|
mode=settings.DEPLOYMENT_MODE,
|
||||||
|
settings=data)
|
||||||
|
|
||||||
|
plugin_name = 'detach-rabbitmq'
|
||||||
|
msg = "Plugin couldn't be enabled. Check plugin version. Test aborted"
|
||||||
|
assert_true(
|
||||||
|
self.fuel_web.check_plugin_exists(cluster_id, plugin_name),
|
||||||
|
msg)
|
||||||
|
options = {'metadata/enabled': True}
|
||||||
|
self.fuel_web.update_plugin_data(cluster_id, plugin_name, options)
|
||||||
|
|
||||||
|
self.fuel_web.update_nodes(
|
||||||
|
cluster_id,
|
||||||
|
{
|
||||||
|
'slave-01': ['controller'],
|
||||||
|
'slave-02': ['controller'],
|
||||||
|
'slave-03': ['controller'],
|
||||||
|
'slave-04': ['standalone-rabbitmq'],
|
||||||
|
'slave-05': ['standalone-rabbitmq'],
|
||||||
|
'slave-06': ['standalone-rabbitmq'],
|
||||||
|
'slave-07': ['compute'],
|
||||||
|
'slave-08': ['ceph-osd'],
|
||||||
|
'slave-09': ['ceph-osd']
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
self.fuel_web.verify_network(cluster_id)
|
||||||
|
|
||||||
|
# Cluster deploy
|
||||||
|
self.fuel_web.deploy_cluster_wait(cluster_id)
|
||||||
|
|
||||||
|
self.fuel_web.verify_network(cluster_id)
|
||||||
|
|
||||||
|
self.fuel_web.run_ostf(
|
||||||
|
cluster_id=cluster_id)
|
||||||
|
|
||||||
|
self.env.make_snapshot("separate_rabbit_ceph_service")
|
Loading…
Reference in New Issue
Block a user