Merge "Precommit test change: - add revert from custom name snapshot - add possibility pull images from external registry"
This commit is contained in:
commit
25b3af8a45
|
@ -15,6 +15,8 @@ import os
|
|||
import pkg_resources
|
||||
import time
|
||||
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
|
||||
_boolean_states = {'1': True, 'yes': True, 'true': True, 'on': True,
|
||||
'0': False, 'no': False, 'false': False, 'off': False}
|
||||
|
||||
|
@ -224,3 +226,6 @@ LVM_PLUGIN_DIR = os.path.join(
|
|||
'/usr/libexec/kubernetes/kubelet-plugins/volume/exec', LVM_PLUGIN_DIRNAME)
|
||||
LVM_PLUGIN_PATH = os.environ.get("LVM_PLUGIN_PATH", "~/lvm")
|
||||
LVM_FILENAME = os.path.basename(LVM_PLUGIN_PATH)
|
||||
|
||||
PRECOMMIT_SNAPSHOT_NAME = os.environ.get(
|
||||
'PRECOMMIT_SNAPSHOT_NAME', ext.SNAPSHOT.ccp_deployed)
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
import pytest
|
||||
|
||||
from fuel_ccp_tests import logger
|
||||
from fuel_ccp_tests import settings
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
|
||||
|
||||
LOG = logger.logger
|
||||
|
||||
|
@ -24,7 +25,7 @@ LOG = logger.logger
|
|||
class TestPreCommitEtcd(object):
|
||||
|
||||
@pytest.mark.test_etcd_on_commit
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_etcd(
|
||||
self, ccpcluster, k8s_actions, config, underlay, show_step):
|
||||
"""Precommit test for etcd
|
||||
|
@ -41,16 +42,14 @@ class TestPreCommitEtcd(object):
|
|||
"""
|
||||
show_step(1)
|
||||
show_step(2)
|
||||
k8s_actions.create_registry()
|
||||
|
||||
show_step(3)
|
||||
ccpcluster.fetch()
|
||||
|
||||
show_step(4)
|
||||
ccpcluster.update_service('etcd')
|
||||
|
||||
show_step(5)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8s_actions.create_registry()
|
||||
show_step(3)
|
||||
ccpcluster.fetch()
|
||||
show_step(4)
|
||||
ccpcluster.update_service('etcd')
|
||||
show_step(5)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
show_step(6)
|
||||
ccpcluster.deploy()
|
||||
|
|
|
@ -17,7 +17,6 @@ import pytest
|
|||
|
||||
from fuel_ccp_tests import logger
|
||||
from fuel_ccp_tests import settings
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
|
||||
|
||||
|
@ -26,8 +25,7 @@ LOG.addHandler(logger.console)
|
|||
|
||||
|
||||
class TestServiceGlance(object):
|
||||
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
@pytest.mark.glance_test
|
||||
@pytest.mark.fail_snapshot
|
||||
def test_glance_api(self, config, underlay,
|
||||
|
@ -47,9 +45,11 @@ class TestServiceGlance(object):
|
|||
k8sclient = k8scluster.api
|
||||
remote = underlay.remote(host=config.k8s.kube_host)
|
||||
|
||||
ccpcluster.fetch()
|
||||
k8scluster.create_registry()
|
||||
ccpcluster.build()
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8scluster.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.build()
|
||||
|
||||
topology_path = os.getcwd() + '/fuel_ccp_tests/templates/' \
|
||||
'k8s_templates/k8s_topology.yaml'
|
||||
remote.upload(topology_path, './')
|
||||
|
|
|
@ -14,15 +14,15 @@
|
|||
import pytest
|
||||
|
||||
from fuel_ccp_tests import logger
|
||||
from fuel_ccp_tests import settings
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
|
||||
LOG = logger.logger
|
||||
LOG.addHandler(logger.console)
|
||||
|
||||
|
||||
class TestDeployHeat(object):
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
@pytest.mark.heat_component
|
||||
def test_heat_component(self, ccpcluster, k8s_actions, rally):
|
||||
"""Heat pre-commit test
|
||||
|
@ -36,15 +36,17 @@ class TestDeployHeat(object):
|
|||
7. Run heat tests
|
||||
Duration 60 min
|
||||
"""
|
||||
LOG.info('Fetch repositories...')
|
||||
ccpcluster.fetch()
|
||||
LOG.info('Update service...')
|
||||
ccpcluster.update_service('heat')
|
||||
LOG.info('Create registry')
|
||||
k8s_actions.create_registry()
|
||||
LOG.info('Build images')
|
||||
ccpcluster.build('base-tools', suppress_output=False)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
LOG.info('Create registry')
|
||||
k8s_actions.create_registry()
|
||||
LOG.info('Fetch repositories...')
|
||||
ccpcluster.fetch()
|
||||
LOG.info('Update service...')
|
||||
ccpcluster.update_service('heat')
|
||||
LOG.info('Build images')
|
||||
ccpcluster.build('base-tools', suppress_output=False)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
LOG.info('Deploy services')
|
||||
ccpcluster.deploy()
|
||||
LOG.info('Check jobs are ready')
|
||||
|
|
|
@ -17,7 +17,6 @@ import pytest
|
|||
from fuel_ccp_tests import logger
|
||||
from fuel_ccp_tests import settings
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
|
||||
LOG = logger.logger
|
||||
LOG.addHandler(logger.console)
|
||||
|
@ -33,7 +32,7 @@ class TestServiceHorizon(object):
|
|||
/horizon-master/openstack_dashboard/test/integration_tests
|
||||
'''.format(registry=settings.REGISTRY, tag='ccp')
|
||||
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
@pytest.mark.horizon_component
|
||||
def test_horizon_component(self, config, underlay,
|
||||
k8scluster, ccpcluster):
|
||||
|
@ -57,10 +56,12 @@ class TestServiceHorizon(object):
|
|||
|
||||
remote = underlay.remote(host=config.k8s.kube_host)
|
||||
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('horizon')
|
||||
k8scluster.create_registry()
|
||||
ccpcluster.build()
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8scluster.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('horizon')
|
||||
ccpcluster.build()
|
||||
|
||||
topology_path = os.getcwd() + '/fuel_ccp_tests/templates/' \
|
||||
'k8s_templates/k8s_topology.yaml'
|
||||
remote.upload(topology_path, settings.CCP_CLI_PARAMS['deploy-config'])
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# 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
|
||||
|
||||
|
||||
class TestPreCommitKeystone(object):
|
||||
|
@ -24,7 +24,7 @@ class TestPreCommitKeystone(object):
|
|||
|
||||
@pytest.mark.keystone_test
|
||||
@pytest.mark.keystone_component
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_keystone(
|
||||
self, ccpcluster, k8s_actions, underlay, rally):
|
||||
"""
|
||||
|
@ -39,12 +39,13 @@ class TestPreCommitKeystone(object):
|
|||
8. Run tempest
|
||||
|
||||
"""
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('keystone')
|
||||
ccpcluster.build('base-tools', suppress_output=False)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('keystone')
|
||||
ccpcluster.build('base-tools', suppress_output=False)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
ccpcluster.deploy()
|
||||
rally.prepare()
|
||||
rally.pull_image()
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
import pytest
|
||||
|
||||
from fuel_ccp_tests import logger
|
||||
from fuel_ccp_tests import settings
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
|
||||
LOG = logger.logger
|
||||
|
||||
|
@ -25,7 +25,7 @@ class TestPreCommitMariadb(object):
|
|||
"""
|
||||
|
||||
@pytest.mark.test_mariadb_on_commit
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_mariadb(
|
||||
self, ccpcluster, k8s_actions, config, underlay, namespace='ccp'):
|
||||
"""Precommit test for mariadb
|
||||
|
@ -40,10 +40,12 @@ class TestPreCommitMariadb(object):
|
|||
8. Check db
|
||||
"""
|
||||
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('mariadb')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('mariadb')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
ccpcluster.deploy()
|
||||
|
||||
post_os_deploy_checks.check_jobs_status(k8s_actions.api, timeout=2500)
|
||||
|
|
|
@ -16,7 +16,6 @@ import json
|
|||
import pytest
|
||||
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
from fuel_ccp_tests import logger
|
||||
from fuel_ccp_tests import settings
|
||||
|
||||
|
@ -39,7 +38,7 @@ class TestPreCommitNeutron(object):
|
|||
"""
|
||||
|
||||
@pytest.mark.test_neutron_on_commit
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_neutron(
|
||||
self, ccpcluster, k8s_actions, rally, underlay, config):
|
||||
"""
|
||||
|
@ -54,10 +53,13 @@ class TestPreCommitNeutron(object):
|
|||
|
||||
"""
|
||||
remote = underlay.remote(host=config.k8s.kube_host)
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('neutron')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('neutron')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
ccpcluster.deploy()
|
||||
rally.prepare()
|
||||
rally.pull_image()
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
import pytest
|
||||
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
from fuel_ccp_tests import settings
|
||||
|
||||
|
||||
class TestPreCommitNova(object):
|
||||
|
@ -32,7 +32,7 @@ class TestPreCommitNova(object):
|
|||
"""
|
||||
|
||||
@pytest.mark.test_nova_on_commit
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_nova(
|
||||
self, ccpcluster, k8s_actions, rally):
|
||||
"""
|
||||
|
@ -46,11 +46,12 @@ class TestPreCommitNova(object):
|
|||
7. Run compute tempest suite
|
||||
|
||||
"""
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('nova')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('nova')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
ccpcluster.deploy()
|
||||
rally.prepare()
|
||||
rally.pull_image()
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# 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
|
||||
|
||||
|
||||
class TestPreCommitSahara(object):
|
||||
|
@ -22,7 +22,7 @@ class TestPreCommitSahara(object):
|
|||
|
||||
@pytest.mark.sahara_test
|
||||
@pytest.mark.sahara_component
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_sahara(
|
||||
self, ccpcluster, k8s_actions, underlay, rally):
|
||||
"""
|
||||
|
@ -38,11 +38,13 @@ class TestPreCommitSahara(object):
|
|||
|
||||
"""
|
||||
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('sahara')
|
||||
ccpcluster.build('base-tools', suppress_output=False)
|
||||
ccpcluster.build(suppress_output=False)
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
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()
|
||||
|
|
|
@ -16,7 +16,6 @@ import pytest
|
|||
import requests
|
||||
|
||||
from fuel_ccp_tests.helpers import post_os_deploy_checks
|
||||
from fuel_ccp_tests.helpers import ext
|
||||
from fuel_ccp_tests import settings
|
||||
|
||||
|
||||
|
@ -41,7 +40,7 @@ class TestPreStackLight(object):
|
|||
}
|
||||
|
||||
@pytest.mark.test_stacklight_on_commit
|
||||
@pytest.mark.revert_snapshot(ext.SNAPSHOT.ccp_deployed)
|
||||
@pytest.mark.revert_snapshot(settings.PRECOMMIT_SNAPSHOT_NAME)
|
||||
def test_deploy_os_with_custom_stack_light(
|
||||
self, ccpcluster, k8s_actions, underlay, config):
|
||||
"""
|
||||
|
@ -56,12 +55,14 @@ class TestPreStackLight(object):
|
|||
8. Run verification
|
||||
|
||||
"""
|
||||
|
||||
remote = underlay.remote(host=config.k8s.kube_host)
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('stacklight')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
if settings.REGISTRY == '127.0.0.1:31500':
|
||||
k8s_actions.create_registry()
|
||||
ccpcluster.fetch()
|
||||
ccpcluster.update_service('stacklight')
|
||||
ccpcluster.build(suppress_output=False)
|
||||
|
||||
topology_path = os.getcwd() + '/fuel_ccp_tests/templates/' \
|
||||
'k8s_templates/stacklight_topology.yaml'
|
||||
|
||||
|
|
Loading…
Reference in New Issue