diff --git a/test-requirements.txt b/test-requirements.txt index 272ce1d..2452b6f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -27,3 +27,5 @@ git+https://github.com/juju/charm-helpers.git#egg=charmhelpers # NOTE: workaround for 14.04 pip/tox pytz pyudev # for ceph-* charm unit tests (not mocked?) +git+https://github.com/openstack-charmers/zaza.git#egg=zaza +git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack diff --git a/tests/README.md b/tests/README.md deleted file mode 100644 index 046be7f..0000000 --- a/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/tests/bundles/bionic-queens.yaml b/tests/bundles/bionic-queens.yaml new file mode 100644 index 0000000..1f1caee --- /dev/null +++ b/tests/bundles/bionic-queens.yaml @@ -0,0 +1,44 @@ +series: bionic +applications: + swift-proxy: + charm: swift-proxy + series: bionic + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/bionic-rocky.yaml b/tests/bundles/bionic-rocky.yaml new file mode 100644 index 0000000..b1ad006 --- /dev/null +++ b/tests/bundles/bionic-rocky.yaml @@ -0,0 +1,51 @@ +series: bionic +applications: + swift-proxy: + charm: swift-proxy + series: bionic + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + openstack-origin: cloud:bionic-rocky + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + source: cloud:bionic-rocky + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:bionic-rocky + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: cloud:bionic-rocky + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/bionic-stein.yaml b/tests/bundles/bionic-stein.yaml new file mode 100644 index 0000000..d92bb7c --- /dev/null +++ b/tests/bundles/bionic-stein.yaml @@ -0,0 +1,51 @@ +series: bionic +applications: + swift-proxy: + charm: swift-proxy + series: bionic + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + openstack-origin: cloud:bionic-stein + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + source: cloud:bionic-stein + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:bionic-stein + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: cloud:bionic-stein + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/disco-stein.yaml b/tests/bundles/disco-stein.yaml new file mode 100644 index 0000000..694e2ef --- /dev/null +++ b/tests/bundles/disco-stein.yaml @@ -0,0 +1,44 @@ +series: disco +applications: + swift-proxy: + charm: swift-proxy + series: disco + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/trusty-mitaka.yaml b/tests/bundles/trusty-mitaka.yaml new file mode 100644 index 0000000..8206b38 --- /dev/null +++ b/tests/bundles/trusty-mitaka.yaml @@ -0,0 +1,51 @@ +series: trusty +applications: + swift-proxy: + charm: swift-proxy + series: trusty + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:trusty/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + source: cloud:trusty-mitaka + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:trusty-mitaka + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: cloud:trusty-mitaka + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/xenial-mitaka.yaml b/tests/bundles/xenial-mitaka.yaml new file mode 100644 index 0000000..fcc046f --- /dev/null +++ b/tests/bundles/xenial-mitaka.yaml @@ -0,0 +1,44 @@ +series: xenial +applications: + swift-proxy: + charm: swift-proxy + series: xenial + num_units: 1 + options: + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/xenial-ocata.yaml b/tests/bundles/xenial-ocata.yaml new file mode 100644 index 0000000..ce3bfc0 --- /dev/null +++ b/tests/bundles/xenial-ocata.yaml @@ -0,0 +1,51 @@ +series: xenial +applications: + swift-proxy: + charm: swift-proxy + series: xenial + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + source: cloud:xenial-ocata + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:xenial-ocata + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: cloud:xenial-ocata + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/xenial-pike.yaml b/tests/bundles/xenial-pike.yaml new file mode 100644 index 0000000..e6a7345 --- /dev/null +++ b/tests/bundles/xenial-pike.yaml @@ -0,0 +1,51 @@ +series: xenial +applications: + swift-proxy: + charm: swift-proxy + series: xenial + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + source: cloud:xenial-pike + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:xenial-pike + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: cloud:xenial-pike + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/bundles/xenial-queens.yaml b/tests/bundles/xenial-queens.yaml new file mode 100644 index 0000000..5596a4a --- /dev/null +++ b/tests/bundles/xenial-queens.yaml @@ -0,0 +1,51 @@ +series: xenial +applications: + swift-proxy: + charm: swift-proxy + series: xenial + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + zone-assignment: manual + replicas: 1 + swift-hash: fdfef9d4-8b06-11e2-8ac0-531c923c8fae + percona-cluster: + charm: cs:~openstack-charmers-next/percona-cluster + num_units: 1 + options: + dataset-size: 25% + max-connections: 1000 + source: cloud:xenial-queens + keystone: + expose: True + charm: cs:~openstack-charmers-next/keystone + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + glance: + expose: True + charm: cs:~openstack-charmers-next/glance + num_units: 1 + options: + openstack-origin: cloud:xenial-queens + swift-storage: + charm: cs:~openstack-charmers-next/swift-storage + num_units: 1 + storage: + block-devices: 'cinder,10G' + options: + openstack-origin: cloud:xenial-queens + zone: 1 +relations: +- - keystone:shared-db + - percona-cluster:shared-db +- - glance:shared-db + - percona-cluster:shared-db +- - glance:identity-service + - keystone:identity-service +- - swift-proxy:identity-service + - keystone:identity-service +- - swift-storage:swift-storage + - swift-proxy:swift-storage +- - glance:object-store + - swift-proxy:object-store diff --git a/tests/dev-basic-disco-stein b/tests/dev-basic-disco-stein deleted file mode 100755 index 453fc62..0000000 --- a/tests/dev-basic-disco-stein +++ /dev/null @@ -1,23 +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 swift-proxy deployment on disco-stein.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='disco') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-queens b/tests/gate-basic-bionic-queens deleted file mode 100755 index cb80d8f..0000000 --- a/tests/gate-basic-bionic-queens +++ /dev/null @@ -1,23 +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 swift-proxy deployment on bionic-queens.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='bionic') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-rocky b/tests/gate-basic-bionic-rocky deleted file mode 100755 index c8fd3bb..0000000 --- a/tests/gate-basic-bionic-rocky +++ /dev/null @@ -1,25 +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 swift-proxy deployment on bionic-rocky.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='bionic', - openstack='cloud:bionic-rocky', - source='cloud:bionic-updates/rocky') - deployment.run_tests() diff --git a/tests/gate-basic-bionic-stein b/tests/gate-basic-bionic-stein deleted file mode 100755 index 837cd50..0000000 --- a/tests/gate-basic-bionic-stein +++ /dev/null @@ -1,25 +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 swift-proxy deployment on bionic-stein.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='bionic', - openstack='cloud:bionic-stein', - source='cloud:bionic-stein') - deployment.run_tests() diff --git a/tests/gate-basic-cosmic-rocky b/tests/gate-basic-cosmic-rocky deleted file mode 100755 index d01ef42..0000000 --- a/tests/gate-basic-cosmic-rocky +++ /dev/null @@ -1,23 +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 swift-proxy deployment on cosmic-rocky.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='cosmic') - deployment.run_tests() diff --git a/tests/gate-basic-trusty-mitaka b/tests/gate-basic-trusty-mitaka deleted file mode 100755 index dd62ec9..0000000 --- a/tests/gate-basic-trusty-mitaka +++ /dev/null @@ -1,25 +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 swift-proxy deployment on trusty-mitaka.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='trusty', - openstack='cloud:trusty-mitaka', - source='cloud:trusty-updates/mitaka') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-mitaka b/tests/gate-basic-xenial-mitaka deleted file mode 100755 index 07b6533..0000000 --- a/tests/gate-basic-xenial-mitaka +++ /dev/null @@ -1,23 +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 swift-proxy deployment on xenial-mitaka.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='xenial') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-ocata b/tests/gate-basic-xenial-ocata deleted file mode 100755 index 46af614..0000000 --- a/tests/gate-basic-xenial-ocata +++ /dev/null @@ -1,25 +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 swift-proxy deployment on xenial-ocata.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='xenial', - openstack='cloud:xenial-ocata', - source='cloud:xenial-updates/ocata') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-pike b/tests/gate-basic-xenial-pike deleted file mode 100755 index 0c1d1ef..0000000 --- a/tests/gate-basic-xenial-pike +++ /dev/null @@ -1,25 +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 swift-proxy deployment on xenial-pike.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='xenial', - openstack='cloud:xenial-pike', - source='cloud:xenial-updates/pike') - deployment.run_tests() diff --git a/tests/gate-basic-xenial-queens b/tests/gate-basic-xenial-queens deleted file mode 100755 index 0da2e6a..0000000 --- a/tests/gate-basic-xenial-queens +++ /dev/null @@ -1,25 +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 swift-proxy deployment on xenial-queens.""" - -from basic_deployment import SwiftProxyBasicDeployment - -if __name__ == '__main__': - deployment = SwiftProxyBasicDeployment(series='xenial', - openstack='cloud:xenial-queens', - source='cloud:xenial-updates/queens') - deployment.run_tests() diff --git a/tests/tests.yaml b/tests/tests.yaml index a03e7ba..3075f94 100644 --- a/tests/tests.yaml +++ b/tests/tests.yaml @@ -1,18 +1,17 @@ -# 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: swift-proxy +gate_bundles: + - bionic-stein + - bionic-rocky + - bionic-queens + - xenial-queens + - xenial-pike + - xenial-ocata + - xenial-mitaka + - trusty-mitaka + - disco-stein +smoke_bundles: + - bionic-queens +dev_bundles: + - disco-stein +tests: + - zaza.openstack.charm_tests.swift.tests.SwiftImageCreateTest diff --git a/tox.ini b/tox.ini index 840bd5f..5963c9b 100644 --- a/tox.ini +++ b/tox.ini @@ -2,9 +2,8 @@ # This file is managed centrally by release-tools and should not be modified # within individual charm repos. [tox] -envlist = pep8,py27,py37 +envlist = pep8,py3 skipsdist = True -skip_missing_interpreters = True [testenv] setenv = VIRTUAL_ENV={envdir} @@ -15,34 +14,21 @@ install_command = pip install {opts} {packages} commands = stestr run {posargs} whitelist_externals = juju -passenv = HOME TERM AMULET_* CS_API_* - -[testenv:py27] -basepython = python2.7 -changedir = swift_manager +passenv = HOME TERM AMULET_* CS_API_* OS_* deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} [testenv:py35] basepython = python3.5 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt [testenv:py36] basepython = python3.6 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt -[testenv:py37] -basepython = python3.7 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +[testenv:py3] +basepython = python3 [testenv:pep8] basepython = python3 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt commands = flake8 {posargs} hooks unit_tests tests actions lib charm-proof @@ -50,8 +36,6 @@ commands = flake8 {posargs} hooks unit_tests tests actions lib # Technique based heavily upon # https://github.com/openstack/nova/blob/master/tox.ini basepython = python3 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt setenv = {[testenv]setenv} PYTHON=coverage run @@ -78,49 +62,25 @@ omit = basepython = python3 commands = {posargs} -[testenv:func27-noop] -# DRY RUN - For Debug -basepython = python2.7 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +[testenv:func] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy + functest-run-suite --keep-model -[testenv:func27] -# Charm Functional Test -# Run all gate tests which are +x (expected to always pass) -basepython = python2.7 -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +[testenv:func-smoke] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy + functest-run-suite --keep-model --smoke -[testenv:func27-smoke] -# Charm Functional Test -# 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 +[testenv:func-dev] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-stein --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 +[testenv:func-target] +basepython = python3 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 + functest-run-suite --keep-model --bundle {posargs} [flake8] ignore = E402,E226