From 92e6702cb2656a19d58cbf6f7a4d58f7b6ab791e Mon Sep 17 00:00:00 2001 From: Dmitry Tyzhnenko Date: Tue, 6 Sep 2016 13:26:48 +0300 Subject: [PATCH] Init default params for cppmanager when reverting Change-Id: I1f9efc9bb19a0455a4a90b217a6554a1260c7f68 --- fuel_ccp_tests/fixtures/ccp_fixtures.py | 4 ++- .../tests/system/pre_commit/test_keystone.py | 34 +++++-------------- 2 files changed, 11 insertions(+), 27 deletions(-) diff --git a/fuel_ccp_tests/fixtures/ccp_fixtures.py b/fuel_ccp_tests/fixtures/ccp_fixtures.py index be0948b..b3107be 100644 --- a/fuel_ccp_tests/fixtures/ccp_fixtures.py +++ b/fuel_ccp_tests/fixtures/ccp_fixtures.py @@ -56,6 +56,9 @@ def ccpcluster(revert_snapshot, config, hardware, If you want to revert 'ccp_deployed' snapshot, please use mark: @pytest.mark.revert_snapshot("ccp_deployed") """ + + ccp_actions.default_params = settings.CCP_CLI_PARAMS + # Try to guess environment config for reverted snapshot if revert_snapshot and config.ccp.os_host == '0.0.0.0': config.ccp.os_host = config.k8s.kube_host @@ -66,7 +69,6 @@ def ccpcluster(revert_snapshot, config, hardware, ccp_actions.put_yaml_config( settings.CCP_CLI_PARAMS['deploy-config'], settings.CCP_DEFAULT_GLOBALS) - ccp_actions.default_params = settings.CCP_CLI_PARAMS ccp_actions.init_default_config() config.ccp.os_host = config.k8s.kube_host 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 9331a2d..b0c0842 100644 --- a/fuel_ccp_tests/tests/system/pre_commit/test_keystone.py +++ b/fuel_ccp_tests/tests/system/pre_commit/test_keystone.py @@ -18,22 +18,6 @@ from fuel_ccp_tests.helpers import post_os_deploy_checks from fuel_ccp_tests.helpers import ext -@pytest.fixture(scope='function') -def ccp(ccp_actions, k8scluster): - """Fixture to install fuel-ccp on k8s environment - - :param env_with_k8s: envmanager.EnvironmentManager - - """ - ccp_actions.install_ccp() - ccp_globals = settings.CCP_DEFAULT_GLOBALS - ccp_actions.put_yaml_config(settings.CCP_CLI_PARAMS['deploy-config'], - ccp_globals) - ccp_actions.default_params = settings.CCP_CLI_PARAMS - ccp_actions.init_default_config() - return ccp_actions - - class TestPreCommitKeystone(object): """docstring for TestPreCommitKeystone @@ -50,9 +34,9 @@ class TestPreCommitKeystone(object): @pytest.mark.keystone_test @pytest.mark.keystone_component - @pytest.mark.revert_snapshot(ext.SNAPSHOT.k8s_deployed) + @pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed) def test_deploy_os_with_custom_keystone( - self, ccp, k8s_actions, underlay, rally): + self, ccpcluster, k8s_actions, underlay, rally): """ Scenario: 1. Install k8s @@ -63,17 +47,15 @@ class TestPreCommitKeystone(object): 6. Deploy components 7. Run identity tempest suite - TODO: - Migrate from ccp to ccpcluster """ k8s_actions.create_registry() - ccp.fetch() - ccp.update_service('keystone', - settings.FUEL_CCP_KEYSTONE_LOCAL_REPO) - ccp.build('base-tools', suppress_output=False) - ccp.build(suppress_output=False) - ccp.deploy() + ccpcluster.fetch() + ccpcluster.update_service('keystone', + settings.FUEL_CCP_KEYSTONE_LOCAL_REPO) + ccpcluster.build('base-tools', suppress_output=False) + ccpcluster.build(suppress_output=False) + ccpcluster.deploy() rally.prepare() rally.pull_image() rally.run()