bodhi/masher.py | 10 ++++++++--
bodhi/model.py | 7 ++++---
bodhi/tests/test_client.py | 2 +-
bodhi/tests/test_controllers.py | 16 ++++++++--------
4 files changed, 21 insertions(+), 14 deletions(-)
New commits:
commit 1313d5bd9f422504c9703ab014f16ff297d0f0ec
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:46:28 2010 -0400
Get our test suite running at 100% again.
diff --git a/bodhi/tests/test_client.py b/bodhi/tests/test_client.py
index ed2134f..a46f3bf 100644
--- a/bodhi/tests/test_client.py
+++ b/bodhi/tests/test_client.py
@@ -208,4 +208,4 @@ close_bugs=True
update = bodhi.query()['updates'][0]
assert update and isinstance(update, dict)
assert
bodhi.update_str(update).startswith(u'================================================================================\n
TurboGears-1.0.3.2-1.fc7\n================================================================================\n
Release: Fedora 7\n Status: pending\n Type: bugfix\n Karma: 0\n
Request: stable\n Bugs: 12345 - None\n : 6789 - None\n Notes: foo\n
Submitter: guest\n')
- assert bodhi.update_str(update).endswith(u' (karma 0)\n This
update has been submitted for stable.\n\n
http://localhost:8084/updates/TurboGears-1.0.3.2-1.fc7\n'),
repr(bodhi.update_str(update))
+ assert bodhi.update_str(update).endswith(u' (karma 0)\n This
update has been submitted for stable by guest.\n\n
http://localhost:8084/updates/TurboGears-1.0.3.2-1.fc7\n')
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index adf32d3..c39a38e 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -1162,16 +1162,16 @@ class TestControllers(testutil.DBTest):
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'testing'
assert len(update.comments) == 1
- assert update.comments[0].author == 'guest'
+ assert update.comments[0].author == 'bodhi', update.comments[0].author
assert update.comments[0].karma == 0
- assert update.comments[0].text == 'This update has been submitted for
testing. '
+ assert update.comments[0].text == 'This update has been submitted for testing
by guest. ', update.comments[0].text
testutil.create_request('/updates/request/stable/%s' %
params['builds'], method='POST',
headers=session)
update = PackageUpdate.byTitle(params['builds'])
assert update.request == 'stable'
assert len(update.comments) == 2
- assert update.get_comments()[-1].text == 'This update has been submitted for
stable. '
+ assert update.get_comments()[-1].text == 'This update has been submitted for
stable by guest. '
testutil.create_request('/updates/request/obsolete/%s' %
params['builds'], method='POST',
headers=session)
@@ -1551,16 +1551,16 @@ class TestControllers(testutil.DBTest):
assert "Push Critical Path update to Stable" not in
cherrypy.response.body[0]
update = PackageUpdate.byTitle(params['builds'])
assert update.karma == 2
- assert update.request == 'stable'
-
- # Reset it, and have releng approve it as well
- update.request = None
+ assert update.request != 'stable', update.request
# Have releng try again, and ensure it can be pushed to stable
testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
params['builds'], method='POST',
headers=releng)
update = PackageUpdate.byTitle(params['builds'])
- assert not update.request
+ assert update.request == 'stable'
+
+ # Reset it
+ update.request = None
testutil.create_request('/updates/%s' % params['builds'],
method='GET', headers=developer)
commit 27bd315e84fda39223a6558a9950c8d51b595444
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:17:29 2010 -0400
Only force critpath updates into testing if they're not there already
diff --git a/bodhi/model.py b/bodhi/model.py
index 4e5d8d8..6fdbbd3 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -422,7 +422,8 @@ class PackageUpdate(SQLObject):
# pending releases directly to stable.
if action == 'stable' and self.release.locked and self.critpath:
if not self.critpath_approved:
- action = 'testing'
+ if self.status != 'testing':
+ action = 'testing'
log.info('Forcing critical path update into testing')
notes.append('This critical path update has not '
'yet been approved. It must reach a karma '
commit 38cafa4cc5f9593e9d4e2defe21808fa75c2ef6d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:16:45 2010 -0400
Comment about critpath requirements as bodhi, but mention the submitter
diff --git a/bodhi/model.py b/bodhi/model.py
index e3b987d..4e5d8d8 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -439,8 +439,8 @@ class PackageUpdate(SQLObject):
#self.date_pushed = None
notes = notes and '. '.join(notes) or ''
flash_log("%s has been submitted for %s. %s"
%(self.title,action,notes))
- self.comment('This update has been submitted for %s. %s' % (action,
notes),
- author=identity.current.user_name)
+ self.comment('This update has been submitted for %s by %s. %s' % (
+ action, identity.current.user_name, notes), author='bodhi')
mail.send_admin(action, self)
def request_complete(self):
commit 90d68ff11c2b3c0ab97e6943e2b49dbe29d9464c
Author: Luke Macken <lmacken(a)redhat.com>
Date: Mon Apr 19 10:16:23 2010 -0400
Handle edge cases where a testing update has a testing request in the
masher.
diff --git a/bodhi/masher.py b/bodhi/masher.py
index 1eb3ab2..4e928c1 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -312,8 +312,14 @@ class MashTask(Thread):
for update in self.updates:
for build in update.builds:
if update.request == 'testing':
- if build.nvr not in pending_nvrs[update.release.name]:
- self.error_log("%s not tagged as candidate" %
build.nvr)
+ if update.status == 'testing':
+ if build.nvr not in testing_nvrs[update.release.name]:
+ self.error_log("%s not tagged as testing" %
+ build.nvr)
+ elif update.status == 'pending':
+ if build.nvr not in pending_nvrs[update.release.name]:
+ self.error_log("%s not tagged as candidate" %
+ build.nvr)
elif update.request == 'stable':
if update.status == 'testing':
if build.nvr not in testing_nvrs[update.release.name]: