Merge "Add possibility to update ccp.yaml"
This commit is contained in:
commit
f0d328d114
|
@ -56,7 +56,7 @@ class CCPManager(object):
|
|||
LOG.info("Use defaults config from ccp")
|
||||
cmd = ('cat fuel-ccp/etc/topology-example.yaml '
|
||||
'>> {deploy_config}').format(
|
||||
deploy_config=settings.DEPLOY_CONFIG)
|
||||
deploy_config=settings.DEPLOY_CONFIG)
|
||||
remote.check_call(cmd, verbose=True)
|
||||
|
||||
@property
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import pytest
|
||||
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
from fuel_ccp_tests.helpers import utils
|
||||
from fuel_ccp_tests.logger import logger
|
||||
|
||||
|
||||
|
@ -44,20 +45,32 @@ class TestCppCliErrorInFetch(object):
|
|||
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_wrong_repo_name(self, admin_node):
|
||||
cmd = ('ccp --repositories-names maria fetch')
|
||||
utils.update_yaml(["repositories"], {'names': ['fuel-ccp-maria']},
|
||||
yaml_file='./.ccp.yaml', remote=admin_node)
|
||||
cmd = 'ccp fetch'
|
||||
admin_node.check_call(cmd, expected=[1], verbose=True)
|
||||
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_wrong_repo_url(self, admin_node):
|
||||
cmd = ('ccp --repositories-fuel-ccp-debian-base '
|
||||
'http://example.org fetch')
|
||||
utils.update_yaml(
|
||||
["repositories"], {'names': ['fuel-ccp-debian-base']},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
utils.update_yaml(
|
||||
["repositories"], {'fuel_ccp_debian_base': 'http://example.org'},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
cmd = 'ccp fetch'
|
||||
admin_node.check_call(cmd, expected=[1], verbose=True)
|
||||
clean_repos(admin_node)
|
||||
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_wrong_scheme_url(self, admin_node):
|
||||
cmd = ('ccp --repositories-fuel-ccp-debian-base '
|
||||
'htt://example.org fetch')
|
||||
utils.update_yaml(
|
||||
["repositories"], {'names': ['fuel-ccp-debian-base']},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
utils.update_yaml(
|
||||
["repositories"], {'fuel_ccp_debian_base': 'htt://example.org'},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
cmd = 'ccp fetch'
|
||||
admin_node.check_call(cmd, expected=[1], verbose=True)
|
||||
clean_repos(admin_node)
|
||||
|
||||
|
@ -73,14 +86,20 @@ class TestCppCliBuildExitCode(object):
|
|||
module pytest.mark: ccp_cli_errexit_codes
|
||||
"""
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_nonexistent_repo_name(self, admin_node):
|
||||
cmd = 'ccp build --components example'
|
||||
def test_nonexistent_repo_name_build(self, admin_node):
|
||||
utils.update_yaml(
|
||||
['action'], {'components': ['example']},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
cmd = 'ccp build'
|
||||
admin_node.check_call(cmd, expected=[1], verbose=True)
|
||||
clean_repos(admin_node)
|
||||
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_error_build_image(self, admin_node):
|
||||
cmd = ('ccp --repositories-names fuel-ccp-debian-base fetch && '
|
||||
utils.update_yaml(
|
||||
['repositories'], {'names': ['fuel-ccp-debian-base']},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
cmd = ('ccp fetch && '
|
||||
'echo "RUN exit 1" >> '
|
||||
'~/ccp-repos/fuel-ccp-debian-base/'
|
||||
'docker/base/Dockerfile.j2')
|
||||
|
@ -102,8 +121,11 @@ class TestCppCliDeploy(object):
|
|||
"""
|
||||
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_nonexistent_repo_name(self, admin_node):
|
||||
cmd = 'ccp deploy --components example'
|
||||
def test_nonexistent_repo_name_deploy(self, admin_node):
|
||||
utils.update_yaml(
|
||||
['action'], {'components': ['example']},
|
||||
yaml_file="./.ccp.yaml", remote=admin_node)
|
||||
cmd = 'ccp deploy'
|
||||
admin_node.check_call(cmd, expected=[1], verbose=True)
|
||||
clean_repos(admin_node)
|
||||
|
||||
|
|
Loading…
Reference in New Issue