amulet test update - switch to consume the usual vip env var; extend test coverage across supported releases
This commit is contained in:
parent
466dafdba2
commit
5c36d4f4ac
16
Makefile
16
Makefile
@ -5,20 +5,18 @@ lint:
|
||||
@flake8 --exclude hooks/charmhelpers hooks unit_tests tests
|
||||
@charm proof
|
||||
|
||||
unit_test:
|
||||
test:
|
||||
@# Bundletester expects unit tests here.
|
||||
@echo Starting unit tests...
|
||||
@$(PYTHON) /usr/bin/nosetests --nologcapture --with-coverage unit_tests
|
||||
|
||||
test:
|
||||
functional_test:
|
||||
@echo Starting Amulet tests...
|
||||
ifndef OS_CHARMS_AMULET_VIP
|
||||
@echo "WARNING: HA tests require OS_CHARMS_AMULET_VIP set to usable vip address"
|
||||
ifndef AMULET_OS_VIP
|
||||
@echo "ERROR: HA tests require AMULET_OS_VIP set to usable vip address"
|
||||
@exit 1
|
||||
endif
|
||||
# coreycb note: The -v should only be temporary until Amulet sends
|
||||
# raise_status() messages to stderr:
|
||||
# https://bugs.launchpad.net/amulet/+bug/1320357
|
||||
@juju test -v -p AMULET_HTTP_PROXY,OS_CHARMS_AMULET_VIP --timeout 900 \
|
||||
00-setup 15-basic-trusty-icehouse
|
||||
@juju test -v -p AMULET_HTTP_PROXY,AMULET_OS_VIP --timeout 2700
|
||||
|
||||
bin/charm_helpers_sync.py:
|
||||
@mkdir -p bin
|
||||
|
@ -4,7 +4,7 @@ maintainer: Andres Rodriguez <andres.rodriguez@canonical.com>
|
||||
subordinate: true
|
||||
description: |
|
||||
Corosync/Pacemaker
|
||||
categories:
|
||||
tags:
|
||||
- misc
|
||||
requires:
|
||||
juju-info:
|
||||
|
11
tests/016-basic-trusty-juno
Executable file
11
tests/016-basic-trusty-juno
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"""Amulet tests on a basic hacluster deployment on trusty-juno."""
|
||||
|
||||
from basic_deployment import HAClusterBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = HAClusterBasicDeployment(series='trusty',
|
||||
openstack='cloud:trusty-juno',
|
||||
source='cloud:trusty-updates/juno')
|
||||
deployment.run_tests()
|
11
tests/017-basic-trusty-kilo
Executable file
11
tests/017-basic-trusty-kilo
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"""Amulet tests on a basic hacluster deployment on trusty-kilo."""
|
||||
|
||||
from basic_deployment import HAClusterBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = HAClusterBasicDeployment(series='trusty',
|
||||
openstack='cloud:trusty-kilo',
|
||||
source='cloud:trusty-updates/kilo')
|
||||
deployment.run_tests()
|
9
tests/019-basic-vivid-kilo
Executable file
9
tests/019-basic-vivid-kilo
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
"""Amulet tests on a basic hacluster deployment on vivid-kilo."""
|
||||
|
||||
from basic_deployment import HAClusterBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = HAClusterBasicDeployment(series='vivid')
|
||||
deployment.run_tests()
|
@ -24,7 +24,7 @@ class HAClusterBasicDeployment(OpenStackAmuletDeployment):
|
||||
"""Deploy the entire test environment."""
|
||||
super(HAClusterBasicDeployment, self).__init__(series, openstack,
|
||||
source, stable)
|
||||
env_var = 'OS_CHARMS_AMULET_VIP'
|
||||
env_var = 'AMULET_OS_VIP'
|
||||
self._vip = os.getenv(env_var, None)
|
||||
if not self._vip:
|
||||
amulet.raise_status(amulet.SKIP, msg="No vip provided with '%s' - "
|
||||
|
Loading…
Reference in New Issue
Block a user