Convert percona-cluster to Zaza
Convert amulet tests to zaza. Add additional tests for new cold boot actions. Use multi-model tests.yaml for different tests for bionic and xenial. Change-Id: I5dadefa6092acecdaae194370a81b05a69b09909
This commit is contained in:
@@ -27,3 +27,6 @@ git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
|
|||||||
# NOTE: workaround for 14.04 pip/tox
|
# NOTE: workaround for 14.04 pip/tox
|
||||||
pytz
|
pytz
|
||||||
pyudev # for ceph-* charm unit tests (not mocked?)
|
pyudev # for ceph-* charm unit tests (not mocked?)
|
||||||
|
git+https://github.com/openstack-charmers/zaza.git#egg=zaza;python_version>='3.0'
|
||||||
|
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
|
||||||
|
|
||||||
|
1
tests/bundles/bionic-ha.yaml
Symbolic link
1
tests/bundles/bionic-ha.yaml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
bionic.yaml
|
14
tests/bundles/bionic.yaml
Normal file
14
tests/bundles/bionic.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
series: bionic
|
||||||
|
relations:
|
||||||
|
- - keystone:shared-db
|
||||||
|
- percona-cluster:shared-db
|
||||||
|
applications:
|
||||||
|
percona-cluster:
|
||||||
|
series: bionic
|
||||||
|
charm: ../../../percona-cluster
|
||||||
|
num_units: 1
|
||||||
|
keystone:
|
||||||
|
charm: cs:~openstack-charmers-next/keystone
|
||||||
|
num_units: 1
|
||||||
|
options:
|
||||||
|
token-expiration: 60
|
1
tests/bundles/disco-ha.yaml
Symbolic link
1
tests/bundles/disco-ha.yaml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
disco.yaml
|
14
tests/bundles/disco.yaml
Normal file
14
tests/bundles/disco.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
series: disco
|
||||||
|
relations:
|
||||||
|
- - keystone:shared-db
|
||||||
|
- percona-cluster:shared-db
|
||||||
|
applications:
|
||||||
|
percona-cluster:
|
||||||
|
series: disco
|
||||||
|
charm: ../../../percona-cluster
|
||||||
|
num_units: 1
|
||||||
|
keystone:
|
||||||
|
charm: cs:~openstack-charmers-next/keystone
|
||||||
|
num_units: 1
|
||||||
|
options:
|
||||||
|
token-expiration: 60
|
1
tests/bundles/overlays/bionic-ha.yaml
Symbolic link
1
tests/bundles/overlays/bionic-ha.yaml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
ha.yaml
|
1
tests/bundles/overlays/disco-ha.yaml
Symbolic link
1
tests/bundles/overlays/disco-ha.yaml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
ha.yaml
|
14
tests/bundles/overlays/ha.yaml
Normal file
14
tests/bundles/overlays/ha.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
relations:
|
||||||
|
- - percona-cluster
|
||||||
|
- hacluster
|
||||||
|
|
||||||
|
applications:
|
||||||
|
percona-cluster:
|
||||||
|
num_units: 3
|
||||||
|
options:
|
||||||
|
min-cluster-size: 3
|
||||||
|
hacluster:
|
||||||
|
charm: cs:~openstack-charmers-next/hacluster
|
||||||
|
num_units: 0
|
||||||
|
options:
|
||||||
|
cluster_count: 3
|
21
tests/bundles/overlays/local-charm-overlay.yaml.j2
Normal file
21
tests/bundles/overlays/local-charm-overlay.yaml.j2
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#applications:
|
||||||
|
# percona-cluster:
|
||||||
|
# options:
|
||||||
|
# vip: {{ OS_VIP00 }}
|
||||||
|
|
||||||
|
|
||||||
|
relations:
|
||||||
|
- - percona-cluster
|
||||||
|
- hacluster
|
||||||
|
|
||||||
|
applications:
|
||||||
|
percona-cluster:
|
||||||
|
num_units: 3
|
||||||
|
options:
|
||||||
|
vip: {{ OS_VIP00 }}
|
||||||
|
min-cluster-size: 3
|
||||||
|
hacluster:
|
||||||
|
charm: cs:~openstack-charmers-next/hacluster
|
||||||
|
num_units: 0
|
||||||
|
options:
|
||||||
|
cluster_count: 3
|
1
tests/bundles/overlays/xenial-ha.yaml
Symbolic link
1
tests/bundles/overlays/xenial-ha.yaml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
ha.yaml
|
1
tests/bundles/xenial-ha.yaml
Symbolic link
1
tests/bundles/xenial-ha.yaml
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
xenial.yaml
|
14
tests/bundles/xenial.yaml
Normal file
14
tests/bundles/xenial.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
series: xenial
|
||||||
|
relations:
|
||||||
|
- - keystone:shared-db
|
||||||
|
- percona-cluster:shared-db
|
||||||
|
applications:
|
||||||
|
percona-cluster:
|
||||||
|
series: xenial
|
||||||
|
charm: ../../../percona-cluster
|
||||||
|
num_units: 1
|
||||||
|
keystone:
|
||||||
|
charm: cs:~openstack-charmers-next/keystone
|
||||||
|
num_units: 1
|
||||||
|
options:
|
||||||
|
token-expiration: 60
|
@@ -1,18 +1,20 @@
|
|||||||
# Bootstrap the model if necessary.
|
charm_name: "percona-cluster"
|
||||||
bootstrap: True
|
tests:
|
||||||
# Re-use bootstrap node.
|
- bionic_model:
|
||||||
reset: True
|
- zaza.openstack.charm_tests.mysql.tests.PerconaClusterColdStartTest
|
||||||
# Use tox/requirements to drive the venv instead of bundletester's venv feature.
|
- zaza.openstack.charm_tests.mysql.tests.PerconaClusterCharmTests
|
||||||
virtualenv: False
|
- zaza.openstack.charm_tests.mysql.tests.PerconaClusterScaleTests
|
||||||
# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet.
|
- xenial_model:
|
||||||
makefile: []
|
- zaza.openstack.charm_tests.mysql.tests.PerconaClusterCharmTests
|
||||||
# Do not specify juju PPA sources. Juju is presumed to be pre-installed
|
- zaza.openstack.charm_tests.mysql.tests.PerconaClusterScaleTests
|
||||||
# and configured in all test runner environments.
|
configure:
|
||||||
#sources:
|
- zaza.model.block_until_all_units_idle
|
||||||
# Do not specify or rely on system packages.
|
target_deploy_status:
|
||||||
#packages:
|
gate_bundles:
|
||||||
# Do not specify python packages here. Use test-requirements.txt
|
- bionic_model: bionic-ha
|
||||||
# and tox instead. ie. The venv is constructed before bundletester
|
- xenial_model: xenial-ha
|
||||||
# is invoked.
|
# Disco disabled until hacluster issues are resolved.
|
||||||
#python-packages:
|
# - disco-ha
|
||||||
reset_timeout: 600
|
smoke_bundles:
|
||||||
|
- bionic_model: bionic-ha
|
||||||
|
dev_bundles:
|
||||||
|
49
tox.ini
49
tox.ini
@@ -14,7 +14,7 @@ install_command =
|
|||||||
pip install {opts} {packages}
|
pip install {opts} {packages}
|
||||||
commands = stestr run {posargs}
|
commands = stestr run {posargs}
|
||||||
whitelist_externals = juju
|
whitelist_externals = juju
|
||||||
passenv = HOME TERM AMULET_* CS_API_*
|
passenv = HOME TERM AMULET_* CS_API_* OS_*
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
[testenv:py35]
|
[testenv:py35]
|
||||||
@@ -71,49 +71,20 @@ omit =
|
|||||||
basepython = python3
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:func27-noop]
|
[testenv:func]
|
||||||
# DRY RUN - For Debug
|
basepython = python3
|
||||||
basepython = python2.7
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands =
|
commands =
|
||||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy
|
functest-run-suite --keep-model
|
||||||
|
|
||||||
[testenv:func27]
|
[testenv:func-smoke]
|
||||||
# Charm Functional Test
|
basepython = python3
|
||||||
# Run all gate tests which are +x (expected to always pass)
|
|
||||||
basepython = python2.7
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands =
|
commands =
|
||||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy
|
functest-run-suite --keep-model --smoke
|
||||||
|
|
||||||
[testenv:func27-smoke]
|
[testenv:func-dev]
|
||||||
# Charm Functional Test
|
basepython = python3
|
||||||
# Run a specific test as an Amulet smoke test (expected to always pass)
|
|
||||||
basepython = python2.7
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands =
|
commands =
|
||||||
bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic --no-destroy
|
functest-run-suite --keep-model --dev
|
||||||
|
|
||||||
[testenv:func27-dfs]
|
|
||||||
# Charm Functional Test
|
|
||||||
# Run all deploy-from-source tests which are +x (may not always pass!)
|
|
||||||
basepython = python2.7
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands =
|
|
||||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy
|
|
||||||
|
|
||||||
[testenv:func27-dev]
|
|
||||||
# Charm Functional Test
|
|
||||||
# Run all development test targets which are +x (may not always pass!)
|
|
||||||
basepython = python2.7
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
commands =
|
|
||||||
bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E402,E226
|
ignore = E402,E226
|
||||||
|
Reference in New Issue
Block a user