From f02b41df74e9ed674a879fdcedd16108a3f269da Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 8 Mar 2023 20:42:38 +0000 Subject: [PATCH] Simplify test output strings for new Gerrit In adapting the integration tests to output from new Gerrit versions, we observed possible nondeterministic ordering or content in some of the fields. We don't need to be nearly so specific in the strings we match anyway, so simplify them for robustness against variable output from the service and improved future flexibility. Change-Id: Icbd70d9c8c9da3637cfa5722a636d140597fe623 --- git_review/tests/test_git_review.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git_review/tests/test_git_review.py b/git_review/tests/test_git_review.py index 0e643aa8..ba5b2f61 100644 --- a/git_review/tests/test_git_review.py +++ b/git_review/tests/test_git_review.py @@ -225,7 +225,7 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase): review_res = self._run_git_review(confirm=True) self.assertIn("Type 'yes' to confirm", review_res) - self.assertIn("Processing changes: new: 2", review_res) + self.assertIn("new: 2", review_res) # abandon changes sent to the Gerrit head = self._run_git('rev-parse', 'HEAD') @@ -239,7 +239,7 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase): self._simple_change('test file modified 4th time', 'test commit message 4') review_res = self._run_git_review('-y') - self.assertIn("Processing changes: refs: 1, new: 2", review_res) + self.assertIn("new: 2", review_res) self.assertIn("remote: SUCCESS", review_res) self.assertIn("test commit message 3 [NEW]", review_res) self.assertIn("test commit message 4 [NEW]", review_res) @@ -258,7 +258,7 @@ class GitReviewTestCase(tests.BaseGitReviewTestCase): review_res = self._run_git_review('--reviewers', 'reviewer1', 'reviewer2') - self.assertIn("Processing changes: new: 1", review_res) + self.assertIn("new: 1", review_res) # verify both reviewers are on patch set head = self._run_git('rev-parse', 'HEAD')