From fd663b307d6df0b6213898aa1a48cf314d8bdd7a Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Mon, 21 Oct 2024 18:29:20 -0700 Subject: [PATCH] Update gate jobs as per the 2025.1 cycle testing runtime As per 2025.1 testing runtime[1], we need to test on Ubuntu Noble (which will be taken care by depends-on tempest and devstack patches to move base jobs to Noble) and at least single job to run on Ubuntu Jammy (for smooth upgrade from previous releases). This commit adds a new job to run on Jammy which can be removed in the next cycle. Also bump the hacking version to fix the pep8 erorr: -AttributeError: 'EntryPoints' object has no attribute 'get' Closes-Bug: #2088356 Depends-On: https://review.opendev.org/c/openstack/tempest/+/932156 [1] https://governance.openstack.org/tc/reference/runtimes/2025.1.html Change-Id: Ib4e2c089e7cd4ebb5aaccb9a747aaffe1618a5fa --- .zuul.yaml | 10 ++++++++++ .../tests/scenario/test_host_reservation.py | 12 ++++++------ test-requirements.txt | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index d40f0e6..811f547 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -7,6 +7,7 @@ check: jobs: - blazar-tempest-plugin-base + - blazar-tempest-plugin-jammy - blazar-tempest-plugin-ipv6-only - blazar-tempest-plugin-2024-2 - blazar-tempest-plugin-2024-1 @@ -14,6 +15,7 @@ gate: jobs: - blazar-tempest-plugin-base + - blazar-tempest-plugin-jammy - job: name: blazar-tempest-plugin-base @@ -46,6 +48,14 @@ - ^doc/.*$ - ^releasenotes/.*$ +# TODO(gmann): As per the 2025.1 testing runtime, we need to run at least +# one job on jammy. This job can be removed in the next cycle(2025.2). +- job: + name: blazar-tempest-plugin-jammy + description: This is integrated job testing on Ubuntu jammy(22.04) + parent: blazar-tempest-plugin-base + nodeset: openstack-single-node-jammy + - job: name: blazar-tempest-plugin-ipv6-only description: | diff --git a/blazar_tempest_plugin/tests/scenario/test_host_reservation.py b/blazar_tempest_plugin/tests/scenario/test_host_reservation.py index c724afb..9155a3d 100644 --- a/blazar_tempest_plugin/tests/scenario/test_host_reservation.py +++ b/blazar_tempest_plugin/tests/scenario/test_host_reservation.py @@ -142,7 +142,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): for i in range(self.MAX_RETRY): try: aggr = self.fetch_aggregate_by_name(aggregate_name) - self.assertTrue(host_name in aggr['hosts']) + self.assertIn(host_name, aggr['hosts']) return except Exception: pass @@ -159,7 +159,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): # check the host is in freepool freepool = self.fetch_aggregate_by_name('freepool') - self.assertTrue(host['host'] in freepool['hosts']) + self.assertIn(host['host'], freepool['hosts']) # try creating a new lease with a missing parameter body = self.get_lease_body_missing_param('scenario-1-missing-param', @@ -250,12 +250,12 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): # check that the host is back in the freepool freepool = self.fetch_aggregate_by_name('freepool') - self.assertTrue(host['host'] in freepool['hosts']) + self.assertIn(host['host'], freepool['hosts']) # check the reservation status lease = self.reservation_client.get_lease(lease_id)['lease'] - self.assertTrue('deleted' in - next(iter(lease['reservations']))['status']) + self.assertIn('deleted', + next(iter(lease['reservations']))['status']) @decorators.attr(type='smoke') def test_update_host_reservation(self): @@ -314,7 +314,7 @@ class TestHostReservationScenario(rrs.ResourceReservationScenarioTest): # check that the host is back in the freepool freepool = self.fetch_aggregate_by_name('freepool') - self.assertTrue(host['host'] in freepool['hosts']) + self.assertIn(host['host'], freepool['hosts']) # check the reservation status lease = self.reservation_client.get_lease(lease_id)['lease'] diff --git a/test-requirements.txt b/test-requirements.txt index a043fc9..6727bae 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0,<3.0.1 # Apache-2.0 +hacking>=7.0.0,<7.1.0 # Apache-2.0 # remove this pyflakes from here once you bump the # hacking to 3.2.0 or above. hacking 3.2.0 takes # care of pyflakes version compatibilty.