Add extra (not mandatory) Zaza tests
A failure in these tests does not indicate an issue with the charm.
Change-Id: If7679cfd4dd81d9176c95917470d99e4880ee0f3
diff --git a/tests/extra/README.md b/tests/extra/README.md
new file mode 100644
index 0000000..24e24ef
--- /dev/null
+++ b/tests/extra/README.md
@@ -0,0 +1,3 @@
+The tests in this directory are optional.
+
+A failure in their run does not indicate an issue with the charm.
diff --git a/tests/extra/bundles/focal-yoga-extra.yaml b/tests/extra/bundles/focal-yoga-extra.yaml
new file mode 100644
index 0000000..8d800a4
--- /dev/null
+++ b/tests/extra/bundles/focal-yoga-extra.yaml
@@ -0,0 +1,143 @@
+series: focal
+variables:
+ openstack-origin: &openstack-origin cloud:focal-yoga
+comment:
+- 'machines section to decide order of deployment. database sooner = faster'
+machines:
+ '0':
+ '1':
+ '2':
+ '3':
+ '4':
+ '5':
+local_overlay_enabled: false
+relations:
+ - - keystone:shared-db
+ - keystone-mysql-router:shared-db
+ - - keystone-mysql-router:db-router
+ - mysql-innodb-cluster:db-router
+ - - glance:identity-service
+ - keystone:identity-service
+ - - glance:amqp
+ - rabbitmq-server:amqp
+ - - glance:shared-db
+ - glance-mysql-router:shared-db
+ - - glance-mysql-router:db-router
+ - mysql-innodb-cluster:db-router
+ - - cinder:identity-service
+ - keystone:identity-service
+ - - cinder:amqp
+ - rabbitmq-server:amqp
+ - - cinder-mysql-router:db-router
+ - mysql-innodb-cluster:db-router
+ - - cinder:shared-db
+ - cinder-mysql-router:shared-db
+ - - cinder:storage-backend
+ - cinder-storpool:storage-backend
+ - - cinder:image-service
+ - glance:image-service
+ - - placement:identity-service
+ - keystone:identity-service
+ - - placement:shared-db
+ - placement-mysql-router:shared-db
+ - - placement-mysql-router:db-router
+ - mysql-innodb-cluster:db-router
+ - - nova-compute:amqp
+ - rabbitmq-server:amqp
+ - - nova-compute:image-service
+ - glance:image-service
+ - - nova-cloud-controller:identity-service
+ - keystone:identity-service
+ - - nova-cloud-controller:amqp
+ - rabbitmq-server:amqp
+ - - nova-cloud-controller:shared-db
+ - nova-mysql-router:shared-db
+ - - nova-mysql-router:db-router
+ - mysql-innodb-cluster:db-router
+ - - nova-cloud-controller:image-service
+ - glance:image-service
+ - - cinder:cinder-volume-service
+ - nova-cloud-controller:cinder-volume-service
+ - - nova-cloud-controller:cloud-compute
+ - nova-compute:cloud-compute
+ - - placement:placement
+ - nova-cloud-controller:placement
+
+applications:
+ mysql-innodb-cluster:
+ charm: cs:~openstack-charmers-next/mysql-innodb-cluster
+ num_units: 3
+ options:
+ source: *openstack-origin
+ to:
+ - 'lxd:0'
+ - 'lxd:1'
+ - 'lxd:2'
+ rabbitmq-server:
+ charm: cs:~openstack-charmers-next/rabbitmq-server
+ num_units: 1
+ options:
+ source: *openstack-origin
+ to:
+ - 'lxd:3'
+ keystone:
+ charm: cs:~openstack-charmers-next/keystone
+ options:
+ openstack-origin: *openstack-origin
+ num_units: 1
+ to:
+ - 'lxd:4'
+ keystone-mysql-router:
+ charm: cs:~openstack-charmers/mysql-router
+ cinder:
+ charm: cs:~openstack-charmers-next/cinder
+ num_units: 1
+ options:
+ openstack-origin: *openstack-origin
+ block-device: None
+ overwrite: "true"
+ ephemeral-unmount: /mnt
+ to:
+ - '5'
+ cinder-storpool:
+ charm: ../../cinder-storpool.charm
+ cinder-mysql-router:
+ charm: cs:~openstack-charmers/mysql-router
+ glance:
+ charm: cs:~openstack-charmers-next/glance
+ num_units: 1
+ options:
+ openstack-origin: *openstack-origin
+ to:
+ - 'lxd:4'
+ glance-mysql-router:
+ charm: cs:~openstack-charmers/mysql-router
+ placement-mysql-router:
+ charm: cs:~openstack-charmers/mysql-router
+ placement:
+ charm: cs:~openstack-charmers-next/placement
+ num_units: 1
+ options:
+ openstack-origin: *openstack-origin
+ to:
+ - 'lxd:2'
+ nova-compute:
+ charm: cs:~openstack-charmers-next/nova-compute
+ num_units: 1
+ options:
+ config-flags: default_ephemeral_format=ext4
+ enable-live-migration: true
+ enable-resize: true
+ migration-auth-type: ssh
+ openstack-origin: *openstack-origin
+ to:
+ - '0'
+ nova-cloud-controller:
+ charm: cs:~openstack-charmers-next/nova-cloud-controller
+ num_units: 1
+ options:
+ openstack-origin: *openstack-origin
+ to:
+ - 'lxd:0'
+ nova-mysql-router:
+ charm: cs:~openstack-charmers/mysql-router
diff --git a/tests/extra/bundles/overlays/focal-yoga-extra.yaml.j2 b/tests/extra/bundles/overlays/focal-yoga-extra.yaml.j2
new file mode 100644
index 0000000..893680c
--- /dev/null
+++ b/tests/extra/bundles/overlays/focal-yoga-extra.yaml.j2
@@ -0,0 +1,52 @@
+variables:
+ public-space: &public-space '{{ CHARM_SP_PUBLIC_SPACE }}'
+machines:
+ '0':
+ constraints: mem=3072M tags={{ CHARM_SP_EXTRA_MACHINE_TAGS }}
+ '1':
+ constraints: mem=3072M tags={{ CHARM_SP_EXTRA_MACHINE_TAGS }}
+ '2':
+ constraints: mem=3072M tags={{ CHARM_SP_EXTRA_MACHINE_TAGS }}
+ '3':
+ constraints: tags={{ CHARM_SP_EXTRA_MACHINE_TAGS }}
+ '4':
+ constraints: tags={{ CHARM_SP_EXTRA_MACHINE_TAGS }}
+ '5':
+ constraints: mem=4G root-disk=16G tags={{ CHARM_SP_EXTRA_MACHINE_TAGS }}
+applications:
+ cinder:
+ bindings:
+ "": *public-space
+ cinder-mysql-router:
+ bindings:
+ "": *public-space
+ keystone:
+ bindings:
+ "": *public-space
+ keystone-mysql-router:
+ bindings:
+ "": *public-space
+ mysql-innodb-cluster:
+ bindings:
+ "": *public-space
+ rabbitmq-server:
+ bindings:
+ "": *public-space
+ cinder-storpool:
+ bindings:
+ "": *public-space
+ options:
+ storpool-template: '{{ CHARM_SP_TEMPLATE }}'
+ sp-api-http-host: '{{ CHARM_SP_API_HTTP_HOST }}'
+ sp-api-http-port: '{{ CHARM_SP_API_HTTP_PORT }}'
+ sp-auth-token: '{{ CHARM_SP_AUTH_TOKEN }}'
+ iscsi-portal-group: '{{ CHARM_SP_ISCSI_PORTAL_GROUP }}'
+ glance:
+ bindings:
+ "": *public-space
+ placement:
+ bindings:
+ "": *public-space
+ nova-cloud-controller:
+ bindings:
+ "": *public-space
diff --git a/tests/extra/tests.py b/tests/extra/tests.py
new file mode 100644
index 0000000..2bd5ad3
--- /dev/null
+++ b/tests/extra/tests.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+
+# Copyright 2022 StorPool
+#
+# 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.
+
+"""Encapsulate cinder-storpool testing."""
+
+from zaza.openstack.charm_tests.cinder.tests import CinderTests
+
+
+class CinderTestsStorPool(CinderTests):
+ """Subclass to skip broken tests"""
+
+ def test_105_volume_create_from_img(self):
+ self.skipTest(
+ "FileNotFoundError: [Errno 2] No such file or directory:"
+ + " '/var/spool/openstack-storpool/openstack-attach.json'"
+ )
+
+ def test_200_online_extend_volume(self):
+ self.skipTest(
+ "neutronclient.common.exceptions.NotFound: Unable to find network with id 'private'"
+ )
diff --git a/tests/extra/tests.yaml b/tests/extra/tests.yaml
new file mode 100644
index 0000000..83ca837
--- /dev/null
+++ b/tests/extra/tests.yaml
@@ -0,0 +1,15 @@
+charm_name: cinder-storpool
+configure:
+ - zaza.openstack.charm_tests.keystone.setup.add_demo_user
+ - zaza.openstack.charm_tests.glance.setup.add_cirros_image
+ - zaza.openstack.charm_tests.glance.setup.add_lts_image
+ - zaza.openstack.charm_tests.nova.setup.create_flavors
+ - zaza.openstack.charm_tests.nova.setup.manage_ssh_key
+tests:
+ - zaza.openstack.charm_tests.cinder.tests.SecurityTests
+ - tests.tests.CinderTestsStorPool
+ - tests.tests.CinderStorPoolTest
+gate_bundles:
+ - focal-yoga-extra
+smoke_bundles:
+ - focal-yoga-extra