From b0f82029d80c29fdaeb45de2e1fcd63836a7d0e4 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 30 May 2024 15:59:47 +0000 Subject: [PATCH] Update the upper bound for Python and Gerrit tests OpenDev is preparing to upgrade its Gerrit deployment to 3.9, so make sure git-review is working with the latest 3.9 point release. This also requires a newer JDK. While we're at it, switch from testing with Python 3.11 to 3.12 since that's ending up in more user environments these days. Also drop unit test jobs that exercise old Python with new Gerrit and new Python with old Gerrit to simplify the test matrix, because our Python 3.6 platform lacks new enough Java to support current Gerrit releases. And since the Python 3.12 testing uses a platform with newer tools, remove an unnecessary Git command output assert where the output has diverged significantly from version to version, trusting that Git will do what it's asked to do because we're not interested in testing it for regressions anyway. Depends-On: https://review.opendev.org/920841 Change-Id: Idb1af841ba68a6f536117ef64f3bec011e905203 --- .zuul.yaml | 23 +++++------------------ bindep.txt | 3 ++- git_review/tests/test_git_review.py | 8 +------- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 84979740..e88a6639 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -4,23 +4,12 @@ nodeset: ubuntu-bionic - job: - name: nox-py36-gerrit-371 - parent: nox-py36-gerrit-default + name: nox-py312-gerrit-395 + parent: nox-py312 + nodeset: ubuntu-noble vars: nox_environment: - WAR_URL: 'https://gerrit-releases.storage.googleapis.com/gerrit-3.7.1.war' - -- job: - name: nox-py311-gerrit-default - parent: nox-py311 - nodeset: ubuntu-jammy - -- job: - name: nox-py311-gerrit-371 - parent: nox-py311-gerrit-default - vars: - nox_environment: - WAR_URL: 'https://gerrit-releases.storage.googleapis.com/gerrit-3.7.1.war' + WAR_URL: 'https://gerrit-releases.storage.googleapis.com/gerrit-3.9.5.war' - project: vars: @@ -32,9 +21,7 @@ - build-python-release - nox-linters - nox-py36-gerrit-default - - nox-py36-gerrit-371 - - nox-py311-gerrit-default - - nox-py311-gerrit-371 + - nox-py312-gerrit-395 gate: jobs: *jobs promote: diff --git a/bindep.txt b/bindep.txt index 9c35486d..a3dc7aa6 100644 --- a/bindep.txt +++ b/bindep.txt @@ -2,4 +2,5 @@ # install and tests; see http://docs.opendev.org/opendev/bindep/ for additional # information. -openjdk-11-jdk [test] +openjdk-11-jdk [test platform:ubuntu-bionic] +openjdk-17-jdk [test platform:ubuntu-noble] diff --git a/git_review/tests/test_git_review.py b/git_review/tests/test_git_review.py index b0eaa5c1..6533f22d 100644 --- a/git_review/tests/test_git_review.py +++ b/git_review/tests/test_git_review.py @@ -19,7 +19,6 @@ import json import os import shutil import tempfile -import testtools from git_review import tests from git_review.tests import utils @@ -431,12 +430,7 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase): 'maint', head_1) self._run_git('fetch') - br_out = self._run_git('checkout', - '-b', 'test_branch', 'origin/maint') - expected_track = (".*\nBranch '?test_branch'? set up to track remote " - "branch '?maint'? from '?origin'?.") - track_matcher = testtools.matchers.MatchesRegex(expected_track) - self.assertThat(br_out, track_matcher) + self._run_git('checkout', '-b', 'test_branch', 'origin/maint') branches = self._run_git('branch', '-a') expected_branch = '* test_branch' observed = branches.split('\n')