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
This commit is contained in:
Joe Gordon
2014-01-25 18:09:45 -08:00
parent ad52b4e86a
commit 0d5eb7a730

View File

@@ -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'))