Change test dirs
Change-Id: I02adcdb169aeb785cbf45f6061746a1921fd471b
This commit is contained in:
parent
3b20f63587
commit
8cfd834125
|
@ -172,7 +172,7 @@ class K8SManager(object):
|
|||
if isinstance(path, str):
|
||||
path = [path]
|
||||
params = ' '.join(["-f {}".format(p) for p in path])
|
||||
cmd = 'kubectl create {params}'.format(params)
|
||||
cmd = 'kubectl create {params}'.format(params=params)
|
||||
with self.__underlay.remote(
|
||||
host=self.__config.k8s.kube_host) as remote:
|
||||
LOG.info("Running command '{cmd}' on node {node}".format(
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
# 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 import settings
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
|
||||
|
||||
@pytest.mark.do_dry_run
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
class TestDryRun(object):
|
||||
"""Deploy OpenStack from prebuilt yaml templates
|
||||
|
||||
pytest.mark: do_dry_run
|
||||
"""
|
||||
@pytest.mark.snapshot_needed
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_fuel_ccp_dry_run(self, ccpcluster, k8scluster):
|
||||
"""Deploy base environment
|
||||
|
||||
Scenario:
|
||||
1. Revert snapshot
|
||||
2. Install microservices
|
||||
3. Create yaml templates
|
||||
4. Deploy environment
|
||||
4. Check deployment
|
||||
|
||||
Duration 35 min
|
||||
"""
|
||||
k8sclient = k8scluster.api
|
||||
k8scluster.create_registry()
|
||||
ccpcluster.build()
|
||||
export_dir = "/home/{user}/export".format(user=settings.SSH_LOGIN)
|
||||
ccpcluster.dry_deploy(export_dir=export_dir)
|
||||
k8scluster.create_objects(path=export_dir)
|
||||
post_os_deploy_checks.check_jobs_status(k8sclient, timeout=1500,
|
||||
namespace='default')
|
||||
post_os_deploy_checks.check_pods_status(k8sclient, timeout=2500,
|
||||
namespace='default')
|
|
@ -16,4 +16,5 @@ pytest_plugins = ['fuel_ccp_tests.fixtures.common_fixtures',
|
|||
'fuel_ccp_tests.fixtures.config_fixtures',
|
||||
'fuel_ccp_tests.fixtures.underlay_fixtures',
|
||||
'fuel_ccp_tests.fixtures.k8s_fixtures',
|
||||
'fuel_ccp_tests.fixtures.rally_fixtures',
|
||||
'fuel_ccp_tests.fixtures.ccp_fixtures']
|
||||
|
|
|
@ -44,21 +44,17 @@ class TestServiceGlance(object):
|
|||
|
||||
Duration 60 min
|
||||
"""
|
||||
k8sclient = k8scluster.get_k8sclient()
|
||||
|
||||
k8sclient = k8scluster.api
|
||||
remote = underlay.remote(host=config.k8s.kube_host)
|
||||
|
||||
ccpcluster.do_fetch()
|
||||
k8scluster.create_registry(remote)
|
||||
ccpcluster.do_build('builder_push',
|
||||
registry_address=settings.REGISTRY)
|
||||
ccpcluster.fetch()
|
||||
k8scluster.create_registry()
|
||||
ccpcluster.build()
|
||||
topology_path = os.getcwd() + '/fuel_ccp_tests/templates/' \
|
||||
'k8s_templates/k8s_topology.yaml'
|
||||
remote.upload(topology_path, './')
|
||||
with remote.get_sudo(remote):
|
||||
ccpcluster.do_deploy(registry_address=settings.REGISTRY,
|
||||
deploy_config='~/k8s_topology.yaml',
|
||||
images_namespace=settings.IMAGES_NAMESPACE)
|
||||
ccpcluster.deploy()
|
||||
post_os_deploy_checks.check_jobs_status(k8sclient, timeout=1500,
|
||||
namespace='ccp')
|
||||
post_os_deploy_checks.check_pods_status(k8sclient, timeout=2500,
|
||||
|
|
|
@ -21,17 +21,7 @@ from fuel_ccp_tests.helpers import ext
|
|||
class TestPreCommitKeystone(object):
|
||||
"""docstring for TestPreCommitKeystone
|
||||
|
||||
Scenario:
|
||||
1. Install k8s
|
||||
2. Install fuel-ccp
|
||||
3. Fetch all repositories
|
||||
4. Fetch keystone from review
|
||||
5. Fetch containers from external registry
|
||||
6. Build keytone container
|
||||
7. Deploy Openstack
|
||||
8. Run tempest
|
||||
"""
|
||||
|
||||
@pytest.mark.keystone_test
|
||||
@pytest.mark.keystone_component
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
|
@ -48,7 +38,6 @@ class TestPreCommitKeystone(object):
|
|||
7. Run identity tempest suite
|
||||
|
||||
"""
|
||||
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('keystone',
|
||||
|
@ -60,5 +49,8 @@ class TestPreCommitKeystone(object):
|
|||
rally.pull_image()
|
||||
rally.run()
|
||||
|
||||
post_os_deploy_checks.check_jobs_status(k8s_actions.api)
|
||||
rally.run_tempest('identity')
|
||||
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.identity')
|
||||
|
|
Loading…
Reference in New Issue