From 6b514da320c7a1bab273440cea5af5b4720c0a02 Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Tue, 4 Feb 2020 10:07:55 -0600 Subject: [PATCH] Migrate designate-bind tests to zaza removing disco_stein as its EOL func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/170 Change-Id: Ia0ef2561364182ac017287a39328109846317279 Closes-Bug: #1828424 --- src/test-requirements.txt | 41 ++++--------------- src/tests/README.md | 9 ---- src/tests/bundles/bionic_queens.yaml | 58 ++++++++++++++++++++++++++ src/tests/bundles/bionic_rocky.yaml | 61 ++++++++++++++++++++++++++++ src/tests/bundles/bionic_stein.yaml | 61 ++++++++++++++++++++++++++++ src/tests/bundles/bionic_train.yaml | 61 ++++++++++++++++++++++++++++ src/tests/bundles/disco_stein.yaml | 58 ++++++++++++++++++++++++++ src/tests/bundles/trusty_mitaka.yaml | 61 ++++++++++++++++++++++++++++ src/tests/bundles/xenial_mitaka.yaml | 58 ++++++++++++++++++++++++++ src/tests/bundles/xenial_ocata.yaml | 61 ++++++++++++++++++++++++++++ src/tests/bundles/xenial_pike.yaml | 61 ++++++++++++++++++++++++++++ src/tests/bundles/xenial_queens.yaml | 61 ++++++++++++++++++++++++++++ src/tests/gate-basic-bionic-queens | 24 ----------- src/tests/gate-basic-bionic-rocky | 27 ------------ src/tests/gate-basic-bionic-stein | 27 ------------ src/tests/gate-basic-bionic-train | 27 ------------ src/tests/gate-basic-trusty-mitaka | 27 ------------ src/tests/gate-basic-xenial-mitaka | 24 ----------- src/tests/gate-basic-xenial-ocata | 27 ------------ src/tests/gate-basic-xenial-pike | 27 ------------ src/tests/gate-basic-xenial-queens | 27 ------------ src/tests/tests.yaml | 39 ++++++++++-------- src/tox.ini | 29 ++++++------- 23 files changed, 642 insertions(+), 314 deletions(-) delete mode 100644 src/tests/README.md create mode 100755 src/tests/bundles/bionic_queens.yaml create mode 100755 src/tests/bundles/bionic_rocky.yaml create mode 100755 src/tests/bundles/bionic_stein.yaml create mode 100755 src/tests/bundles/bionic_train.yaml create mode 100755 src/tests/bundles/disco_stein.yaml create mode 100755 src/tests/bundles/trusty_mitaka.yaml create mode 100755 src/tests/bundles/xenial_mitaka.yaml create mode 100755 src/tests/bundles/xenial_ocata.yaml create mode 100755 src/tests/bundles/xenial_pike.yaml create mode 100755 src/tests/bundles/xenial_queens.yaml delete mode 100755 src/tests/gate-basic-bionic-queens delete mode 100755 src/tests/gate-basic-bionic-rocky delete mode 100755 src/tests/gate-basic-bionic-stein delete mode 100755 src/tests/gate-basic-bionic-train delete mode 100755 src/tests/gate-basic-trusty-mitaka delete mode 100755 src/tests/gate-basic-xenial-mitaka delete mode 100755 src/tests/gate-basic-xenial-ocata delete mode 100755 src/tests/gate-basic-xenial-pike delete mode 100755 src/tests/gate-basic-xenial-queens diff --git a/src/test-requirements.txt b/src/test-requirements.txt index b5179ff..f62563a 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -1,33 +1,8 @@ -# This file is managed centrally. If you find the need to modify this as a -# one-off, please don't. Intead, consult #openstack-charms and ask about -# requirements management in charms via bot-control. Thank you. -charm-tools>=2.4.4 -coverage>=3.6 -mock>=1.2 -flake8>=2.2.4,<=2.4.1 -stestr>=2.2.0 -requests>=2.18.4 -# BEGIN: Amulet OpenStack Charm Helper Requirements -# Liberty client lower constraints -amulet>=1.14.3,<2.0;python_version=='2.7' -bundletester>=0.6.1,<1.0;python_version=='2.7' -aodhclient>=0.1.0 -gnocchiclient>=3.1.0,<3.2.0 -python-barbicanclient>=4.0.1 -python-ceilometerclient>=1.5.0 -python-cinderclient>=1.4.0,<5.0.0 -python-designateclient>=1.5,<3.0.0 -python-glanceclient>=1.1.0 -python-heatclient>=0.8.0 -python-keystoneclient>=1.7.1 -python-manilaclient>=1.8.1 -python-neutronclient>=3.1.0 -python-novaclient>=2.30.1 -python-openstackclient>=1.7.0 -python-swiftclient>=2.6.0 -pika>=0.10.0,<1.0 -distro-info -git+https://github.com/juju/charm-helpers.git#egg=charmhelpers -# END: Amulet OpenStack Charm Helper Requirements -pytz # workaround for 14.04 pip/tox -pyudev # for ceph-* charm unit tests (not mocked?) +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of *requirements.txt files for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools +# +# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!) +git+https://github.com/openstack-charmers/zaza.git#egg=zaza +git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack \ No newline at end of file diff --git a/src/tests/README.md b/src/tests/README.md deleted file mode 100644 index 046be7f..0000000 --- a/src/tests/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Overview - -This directory provides Amulet tests to verify basic deployment functionality -from the perspective of this charm, its requirements and its features, as -exercised in a subset of the full OpenStack deployment test bundle topology. - -For full details on functional testing of OpenStack charms please refer to -the [functional testing](http://docs.openstack.org/developer/charm-guide/testing.html#functional-testing) -section of the OpenStack Charm Guide. diff --git a/src/tests/bundles/bionic_queens.yaml b/src/tests/bundles/bionic_queens.yaml new file mode 100755 index 0000000..737b7b3 --- /dev/null +++ b/src/tests/bundles/bionic_queens.yaml @@ -0,0 +1,58 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/bionic_rocky.yaml b/src/tests/bundles/bionic_rocky.yaml new file mode 100755 index 0000000..06f16e2 --- /dev/null +++ b/src/tests/bundles/bionic_rocky.yaml @@ -0,0 +1,61 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:bionic-rocky + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/bionic_stein.yaml b/src/tests/bundles/bionic_stein.yaml new file mode 100755 index 0000000..c223722 --- /dev/null +++ b/src/tests/bundles/bionic_stein.yaml @@ -0,0 +1,61 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:bionic-stein + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/bionic_train.yaml b/src/tests/bundles/bionic_train.yaml new file mode 100755 index 0000000..fb725a7 --- /dev/null +++ b/src/tests/bundles/bionic_train.yaml @@ -0,0 +1,61 @@ +series: bionic + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-train + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:bionic-train + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/disco_stein.yaml b/src/tests/bundles/disco_stein.yaml new file mode 100755 index 0000000..3d3607d --- /dev/null +++ b/src/tests/bundles/disco_stein.yaml @@ -0,0 +1,58 @@ +series: disco + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/trusty_mitaka.yaml b/src/tests/bundles/trusty_mitaka.yaml new file mode 100755 index 0000000..cb37a41 --- /dev/null +++ b/src/tests/bundles/trusty_mitaka.yaml @@ -0,0 +1,61 @@ +series: trusty + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:trusty/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:trusty-mitaka + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/xenial_mitaka.yaml b/src/tests/bundles/xenial_mitaka.yaml new file mode 100755 index 0000000..93bf89a --- /dev/null +++ b/src/tests/bundles/xenial_mitaka.yaml @@ -0,0 +1,58 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/xenial_ocata.yaml b/src/tests/bundles/xenial_ocata.yaml new file mode 100755 index 0000000..196f216 --- /dev/null +++ b/src/tests/bundles/xenial_ocata.yaml @@ -0,0 +1,61 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:xenial-ocata + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/xenial_pike.yaml b/src/tests/bundles/xenial_pike.yaml new file mode 100755 index 0000000..46c3bd6 --- /dev/null +++ b/src/tests/bundles/xenial_pike.yaml @@ -0,0 +1,61 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:xenial-pike + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/bundles/xenial_queens.yaml b/src/tests/bundles/xenial_queens.yaml new file mode 100755 index 0000000..70b80a8 --- /dev/null +++ b/src/tests/bundles/xenial_queens.yaml @@ -0,0 +1,61 @@ +series: xenial + +machines: + '0': + constraints: mem=3072M + '1': + '2': + '3': + '4': + '5': + +applications: + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + to: + - '0' + keystone: + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + to: + - '1' + rabbitmq-server: + charm: cs:~openstack-charmers-next/rabbitmq-server + num_units: 1 + to: + - '2' + designate: + charm: cs:~openstack-charmers-next/designate + num_units: 1 + options: + nameservers: 'ns1.mojotest.com.' + openstack-origin: cloud:xenial-queens + to: + - '3' + memcached: + charm: cs:~memcached-team/memcached + num_units: 1 + to: + - '4' + designate-bind: + charm: ../../../designate-bind + num_units: 1 + to: + - '5' + +relations: +- - 'designate:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:amqp' + - 'rabbitmq-server:amqp' +- - 'designate:identity-service' + - 'keystone:identity-service' +- - 'keystone:shared-db' + - 'percona-cluster:shared-db' +- - 'designate:dns-backend' + - 'designate-bind:dns-backend' +- - 'designate:coordinator-memcached' + - 'memcached:cache' diff --git a/src/tests/gate-basic-bionic-queens b/src/tests/gate-basic-bionic-queens deleted file mode 100755 index 21a2ae3..0000000 --- a/src/tests/gate-basic-bionic-queens +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on queens.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment(series='bionic') - deployment.run_tests() diff --git a/src/tests/gate-basic-bionic-rocky b/src/tests/gate-basic-bionic-rocky deleted file mode 100755 index 4b295da..0000000 --- a/src/tests/gate-basic-bionic-rocky +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on bionic-rocky.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='bionic', - openstack='cloud:bionic-rocky', - source='cloud:bionic-updates/rocky') - deployment.run_tests() diff --git a/src/tests/gate-basic-bionic-stein b/src/tests/gate-basic-bionic-stein deleted file mode 100755 index a2373e9..0000000 --- a/src/tests/gate-basic-bionic-stein +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on bionic-stein.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='bionic', - openstack='cloud:bionic-stein', - source='cloud:bionic-stein') - deployment.run_tests() diff --git a/src/tests/gate-basic-bionic-train b/src/tests/gate-basic-bionic-train deleted file mode 100755 index ff4574d..0000000 --- a/src/tests/gate-basic-bionic-train +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2019 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on bionic-train.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='bionic', - openstack='cloud:bionic-train', - source='cloud:bionic-train') - deployment.run_tests() diff --git a/src/tests/gate-basic-trusty-mitaka b/src/tests/gate-basic-trusty-mitaka deleted file mode 100755 index 69145cc..0000000 --- a/src/tests/gate-basic-trusty-mitaka +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on trusty-mitaka.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='trusty', - openstack='cloud:trusty-mitaka', - source='cloud:trusty-updates/mitaka') - deployment.run_tests() diff --git a/src/tests/gate-basic-xenial-mitaka b/src/tests/gate-basic-xenial-mitaka deleted file mode 100755 index 607afb8..0000000 --- a/src/tests/gate-basic-xenial-mitaka +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on mitaka.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment(series='xenial') - deployment.run_tests() diff --git a/src/tests/gate-basic-xenial-ocata b/src/tests/gate-basic-xenial-ocata deleted file mode 100755 index 38eba12..0000000 --- a/src/tests/gate-basic-xenial-ocata +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on xenial-ocata.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='xenial', - openstack='cloud:xenial-ocata', - source='cloud:xenial-updates/ocata') - deployment.run_tests() diff --git a/src/tests/gate-basic-xenial-pike b/src/tests/gate-basic-xenial-pike deleted file mode 100755 index 042a34b..0000000 --- a/src/tests/gate-basic-xenial-pike +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on xenial-pike.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='xenial', - openstack='cloud:xenial-pike', - source='cloud:xenial-updates/pike') - deployment.run_tests() diff --git a/src/tests/gate-basic-xenial-queens b/src/tests/gate-basic-xenial-queens deleted file mode 100755 index 25c403f..0000000 --- a/src/tests/gate-basic-xenial-queens +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016 Canonical Ltd -# -# 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. - - -"""Amulet tests on a basic designate-bind deployment on xenial-queens.""" - -from basic_deployment import DesignateBindDeployment - -if __name__ == '__main__': - deployment = DesignateBindDeployment( - series='xenial', - openstack='cloud:xenial-queens', - source='cloud:xenial-updates/queens') - deployment.run_tests() diff --git a/src/tests/tests.yaml b/src/tests/tests.yaml index a03e7ba..70b21ae 100644 --- a/src/tests/tests.yaml +++ b/src/tests/tests.yaml @@ -1,18 +1,21 @@ -# Bootstrap the model if necessary. -bootstrap: True -# Re-use bootstrap node. -reset: True -# Use tox/requirements to drive the venv instead of bundletester's venv feature. -virtualenv: False -# Leave makefile empty, otherwise unit/lint tests will rerun ahead of amulet. -makefile: [] -# Do not specify juju PPA sources. Juju is presumed to be pre-installed -# and configured in all test runner environments. -#sources: -# Do not specify or rely on system packages. -#packages: -# Do not specify python packages here. Use test-requirements.txt -# and tox instead. ie. The venv is constructed before bundletester -# is invoked. -#python-packages: -reset_timeout: 600 +charm_name: designate-bind + +smoke_bundles: + - bionic_train + +gate_bundles: + - trusty_mitaka + - xenial_mitaka + - xenial_ocata + - xenial_pike + - xenial_queens + - bionic_queens + - bionic_rocky + - bionic_stein + - bionic_train + +dev_bundles: + - bionic_train + +tests: + - zaza.openstack.charm_tests.designate.tests.DesignateTests \ No newline at end of file diff --git a/src/tox.ini b/src/tox.ini index dd17ae5..07a7adc 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -1,4 +1,4 @@ -# Source charm (with amulet): ./src/tox.ini +# Source charm (with zaza): ./src/tox.ini # This file is managed centrally by release-tools and should not be modified # within individual charm repos. See the 'global' dir contents for available # choices of tox.ini for OpenStack Charms: @@ -15,41 +15,36 @@ skip_missing_interpreters = False [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 - CHARM_DIR={envdir} - AMULET_SETUP_TIMEOUT=5400 whitelist_externals = juju -passenv = HOME TERM AMULET_* CS_* OS_* TEST_* +passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt install_command = pip install {opts} {packages} [testenv:pep8] basepython = python3 +deps=charm-tools commands = charm-proof [testenv:func-noop] -# DRY RUN - For Debug -basepython = python2.7 +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy + functest-run-suite --help [testenv:func] -# Run all gate tests which are +x (expected to always pass) -basepython = python2.7 +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy + functest-run-suite --keep-model [testenv:func-smoke] -# Run a specific test as an Amulet smoke test (expected to always pass) -basepython = python2.7 +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-train --no-destroy + functest-run-suite --keep-model --smoke -[testenv:func-dev] -# Run all development test targets which are +x (may not always pass!) -basepython = python2.7 +[testenv:func-target] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy + functest-run-suite --keep-model --bundle {posargs} [testenv:venv] commands = {posargs}