From 48a2ce2fb90d8725b10f5435a948358b99375410 Mon Sep 17 00:00:00 2001 From: Peter Sabaini Date: Tue, 19 Sep 2023 14:40:45 +0200 Subject: [PATCH] Add bobcat:reef mapping Signed-off-by: Peter Sabaini Change-Id: I042e3ce9d17e5060b8f1f46f877ef06d8d95613c --- ops_openstack/core.py | 1 + unit_tests/test_ops_openstack.py | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ops_openstack/core.py b/ops_openstack/core.py index b4f2e13..e41288e 100644 --- a/ops_openstack/core.py +++ b/ops_openstack/core.py @@ -53,6 +53,7 @@ UCA_CODENAME_MAP = { 'yoga': 'quincy', 'zed': 'quincy', 'antelope': 'quincy', + 'bobcat': 'reef', } diff --git a/unit_tests/test_ops_openstack.py b/unit_tests/test_ops_openstack.py index 43244a2..5272044 100644 --- a/unit_tests/test_ops_openstack.py +++ b/unit_tests/test_ops_openstack.py @@ -303,13 +303,13 @@ class TestOSBaseCharm(CharmTestCase): self.harness.charm.unit.status, BlockedStatus) self.os_utils.ows_check_services_running.assert_called_once_with( - ['apache2', 'ks-api'], ports=[]) + self.harness.charm.services(), ports=[]) def test_services(self): self.harness.begin() self.assertEqual( - self.harness.charm.services(), - ['apache2', 'ks-api']) + set(self.harness.charm.services()), + set(['apache2', 'ks-api'])) def test_pre_series_upgrade(self): self.os_utils.manage_payload_services.return_value = ('a', 'b') @@ -321,7 +321,7 @@ class TestOSBaseCharm(CharmTestCase): self.assertTrue(self.harness.charm._stored.is_paused) self.os_utils.manage_payload_services.assert_called_once_with( 'pause', - services=['apache2', 'ks-api'], + services=self.harness.charm.services(), charm_func=None) def test_post_series_upgrade(self): @@ -334,7 +334,7 @@ class TestOSBaseCharm(CharmTestCase): self.assertFalse(self.harness.charm._stored.is_paused) self.os_utils.manage_payload_services.assert_called_once_with( 'resume', - services=['apache2', 'ks-api'], + services=self.harness.charm.services(), charm_func=None) def test_pause(self): @@ -345,7 +345,7 @@ class TestOSBaseCharm(CharmTestCase): self.assertTrue(self.harness.charm._stored.is_paused) self.os_utils.manage_payload_services.assert_called_once_with( 'pause', - services=['apache2', 'ks-api'], + services=self.harness.charm.services(), charm_func=None) def test_resume(self): @@ -356,7 +356,7 @@ class TestOSBaseCharm(CharmTestCase): self.assertFalse(self.harness.charm._stored.is_paused) self.os_utils.manage_payload_services.assert_called_once_with( 'resume', - services=['apache2', 'ks-api'], + services=self.harness.charm.services(), charm_func=None) def test_mandatory_config(self):