From 83d39f258ac7643e25fd3c6fb7cbfdfa7d442dc0 Mon Sep 17 00:00:00 2001 From: James Page Date: Fri, 13 Jan 2023 16:17:20 +0000 Subject: [PATCH] ci: add Zuul configuration Add basic check tasks for Zuul. Add git review configuration. Pull in PEP8 related fixes, Co-Authored-By: Nikolay Vinogradov Change-Id: If40926f8c71541d954056a5b275e1283c5ce85ae --- .gitreview | 5 +++++ .zuul.yaml | 4 ++++ tests/tests.py | 13 +++++-------- 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .gitreview create mode 100644 .zuul.yaml diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..1df5051 --- /dev/null +++ b/.gitreview @@ -0,0 +1,5 @@ +[gerrit] +host=review.opendev.org +port=29418 +project=openstack/charm-cinder-infinidat.git +defaultbranch=main diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..7ffc71c --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,4 @@ +- project: + templates: + - openstack-python3-charm-yoga-jobs + - openstack-cover-jobs diff --git a/tests/tests.py b/tests/tests.py index c7db113..71c6ac9 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -16,17 +16,14 @@ """Encapsulate cinder-infinidat testing.""" -import zaza.charm_lifecycle.utils as lifecycle_utils import zaza.openstack.utilities.openstack as openstack -import zaza.openstack.utilities.generic as generic from zaza.openstack.charm_tests.cinder_backend.tests import CinderBackendTest from zaza.openstack.charm_tests.cinder.tests import CinderTests +import cinderclient.exceptions as cinder_exceptions +BACKEND_NAME = 'cinder-infinidat' -import zaza.model as zaza_model - -BACKEND_NAME='cinder-infinidat' def configure_default_volume_type(): @@ -38,11 +35,12 @@ def configure_default_volume_type(): try: vol_type = cinder.volume_types.find(name=type_name) vol_type.set_keys(metadata={ - 'volume_backend_name': BACKEND_NAME, + 'volume_backend_name': BACKEND_NAME, }) except cinder_exceptions.NotFound: raise + class CinderInfinidatBackendTest(CinderBackendTest): """Encapsulate Infinidat tests.""" @@ -59,6 +57,7 @@ class CinderInfinidatBackendTest(CinderBackendTest): def test_create_volume(self): return super().test_create_volume() + class CinderInfinidatTest(CinderTests): """ Re-use most relevant existing Cinder tests, @@ -70,5 +69,3 @@ class CinderInfinidatTest(CinderTests): def test_900_restart_on_config_change(self): return - -