From dd585b759cb17f16cf1c06e0ada0df491d9fdd25 Mon Sep 17 00:00:00 2001 From: Dmitry Tyzhnenko Date: Tue, 4 Oct 2016 12:16:37 +0300 Subject: [PATCH] Add Sahara precomit test Change-Id: I98158868b11268d73591aeda7b666acf7e600366 --- .../tests/system/pre_commit/test_keystone.py | 4 +- .../tests/system/pre_commit/test_sahara.py | 55 +++++++++++++++++++ 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 fuel_ccp_tests/tests/system/pre_commit/test_sahara.py diff --git a/fuel_ccp_tests/tests/system/pre_commit/test_keystone.py b/fuel_ccp_tests/tests/system/pre_commit/test_keystone.py index a471efb..e90ec1d 100644 --- a/fuel_ccp_tests/tests/system/pre_commit/test_keystone.py +++ b/fuel_ccp_tests/tests/system/pre_commit/test_keystone.py @@ -13,7 +13,6 @@ # under the License. import pytest -from fuel_ccp_tests import settings from fuel_ccp_tests.helpers import post_os_deploy_checks from fuel_ccp_tests.helpers import ext @@ -43,8 +42,7 @@ class TestPreCommitKeystone(object): k8s_actions.create_registry() ccpcluster.fetch() - ccpcluster.update_service('keystone', - settings.FUEL_CCP_KEYSTONE_LOCAL_REPO) + ccpcluster.update_service('keystone') ccpcluster.build('base-tools', suppress_output=False) ccpcluster.build(suppress_output=False) ccpcluster.deploy() diff --git a/fuel_ccp_tests/tests/system/pre_commit/test_sahara.py b/fuel_ccp_tests/tests/system/pre_commit/test_sahara.py new file mode 100644 index 0000000..492826c --- /dev/null +++ b/fuel_ccp_tests/tests/system/pre_commit/test_sahara.py @@ -0,0 +1,55 @@ +# 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. +import pytest + +from fuel_ccp_tests.helpers import post_os_deploy_checks +from fuel_ccp_tests.helpers import ext + + +class TestPreCommitSahara(object): + """docstring for TestPreCommitSahara""" + + @pytest.mark.sahara_test + @pytest.mark.sahara_component + @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed) + def test_deploy_os_with_custom_sahara( + self, ccpcluster, k8s_actions, underlay, rally): + """ + Scenario: + 1. Install k8s + 2. Install fuel-ccp + 3. Fetch all repositories + 4. Fetch sahara from review + 5. Fetch containers from external registry + 6. Build sahara container + 7. Deploy Openstack + 8. Run tempest + + """ + + k8s_actions.create_registry() + ccpcluster.fetch() + ccpcluster.update_service('sahara') + ccpcluster.build('base-tools', suppress_output=False) + ccpcluster.build(suppress_output=False) + ccpcluster.deploy() + rally.prepare() + rally.pull_image() + rally.run() + + post_os_deploy_checks.check_jobs_status(k8s_actions.api, timeout=1500, + namespace='ccp') + post_os_deploy_checks.check_pods_status(k8s_actions.api, timeout=2500, + namespace='ccp') + rally.run_tempest('--regex ^tempest.api.data_processing.*')