From 0d5eb7a73050ecca681d65b66a8b16b7c0812b1c Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Sat, 25 Jan 2014 18:09:45 -0800 Subject: [PATCH] Make functional tests work again We don't comment on a job if we didn't classify it and that test was causing the functional tests to be racy. Change-Id: Id6f79e74597ba6de70602befe573146102160529 --- .../tests/functional/test_gerrit_comment.py | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/elastic_recheck/tests/functional/test_gerrit_comment.py b/elastic_recheck/tests/functional/test_gerrit_comment.py index ec036c0d..7578b3d1 100644 --- a/elastic_recheck/tests/functional/test_gerrit_comment.py +++ b/elastic_recheck/tests/functional/test_gerrit_comment.py @@ -42,7 +42,9 @@ class TestGerritComment(testtools.TestCase): comments = result.get('comments') comment = comments[-1] self.assertIn( - "I noticed tempest failed, I think you hit bug " + "I noticed tempest failed, I think you hit bug(s):", + comment.get('message')) + self.assertIn( "https://bugs.launchpad.net/bugs/1223158", comment.get('message')) @@ -56,20 +58,11 @@ class TestGerritComment(testtools.TestCase): comments = result.get('comments') comment = comments[-1] self.assertIn( - "I noticed tempest failed, I think you hit bug " - "https://bugs.launchpad.net/bugs/1223158 and " - "https://bugs.launchpad.net/bugs/424242 and", + "I noticed tempest failed, I think you hit bug(s):", comment.get('message')) - - def test_bug_not_found(self): - project = 'gtest-org/test' - commit_id = '434,1' - commit = '434' - self.stream.leave_comment(project, commit_id) - result = self.gerrit.query(commit, comments=True) - comments = result.get('comments') - comment = comments[-1] self.assertIn( - "https://wiki.openstack.org/wiki/" - "GerritJenkinsGithub#Test_Failures", + "https://bugs.launchpad.net/bugs/1223158", + comment.get('message')) + self.assertIn( + "https://bugs.launchpad.net/bugs/424242", comment.get('message'))