bodhi/controllers.py | 2 -
bodhi/model.py | 2 -
bodhi/static/css/layout.css | 37 -------------------------
bodhi/templates/master.html | 2 -
bodhi/tests/test_controllers.py | 59 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 62 insertions(+), 40 deletions(-)
New commits:
commit 8aa508d898bec7a7e78956c2671eef4ca51da9ee
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Sep 10 18:08:27 2010 -0400
Add a test_push_noncritpath_on_critpath_reqs unit test to validate the
previous commit
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py
index 82ab882..a9c5cf3 100644
--- a/bodhi/tests/test_controllers.py
+++ b/bodhi/tests/test_controllers.py
@@ -2347,3 +2347,62 @@ class TestControllers(testutil.DBTest):
up = PackageUpdate.byTitle(params['builds'])
assert up.request == 'stable'
assert up.comments[-1].text == u'This update has been submitted for stable by
guest. '
+
+ def test_push_noncritpath_on_critpath_reqs(self):
+ """
+ Make sure normal updates can meet the testing requirements after
+ achieving critpath-level approval.
+ """
+ session = login(username='admin', group='proventesters')
+ create_release()
+ f7 = Release.byName('F7')
+ assert f7.mandatory_days_in_testing, f7.mandatory_days_in_testing
+ params = {
+ 'builds' : 'nethack-2.6.31-1.fc7',
+ 'release' : 'Fedora 7',
+ 'type_' : 'bugfix',
+ 'bugs' : '',
+ 'notes' : '',
+ 'autokarma': True,
+ 'stable_karma' : 3,
+ 'request': 'stable',
+ 'unstable_karma' : -3,
+ }
+
+ #testutil.capture_log(['bodhi.controllers', 'bodhi.util',
'bodhi.model'])
+ self.save_update(params, session)
+ #logs = testutil.get_log()
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request != 'stable', update.request
+
+ # proventester +1
+
testutil.create_request('/updates/comment?text=foobar&title=%s&karma=1' %
+ params['builds'], method='POST',
headers=session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.karma == 1
+ assert update.request != 'stable'
+ assert len(update.comments) == 2
+ assert not update.critpath
+ assert not update.critpath_approved
+ assert update.num_admin_approvals == 1
+
+ # try to push, and fail
+ testutil.create_request('/updates/request/stable/%s' %
params['builds'],
+ method='POST', headers=session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request != 'stable'
+
+ # normal user +1
+
testutil.create_request('/updates/comment?text=bizbaz&title=%s&karma=1' %
+ params['builds'], method='POST',
+ headers=login())
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.karma == 2, update.karma
+ assert update.request != 'stable'
+ assert update.num_admin_approvals == 1
+
+ # currently: try to push fail... eventually, succeed
+ testutil.create_request('/updates/request/stable/%s' %
params['builds'],
+ method='POST', headers=session)
+ update = PackageUpdate.byTitle(params['builds'])
+ assert update.request == 'stable'
commit 50e3c79180635b1a24479477963153b95b43d7b6
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Sep 10 18:07:18 2010 -0400
Allow for normal updates hit stable after meeting cripath requirements.
diff --git a/bodhi/model.py b/bodhi/model.py
index f88824f..c03e194 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -466,7 +466,7 @@ class PackageUpdate(SQLObject):
flash_notes = ''
if action == 'stable' and not self.critpath:
# Check if we've met the karma requirements
- if self.karma >= self.stable_karma:
+ if self.karma >= self.stable_karma or self.critpath_approved:
pass
else:
# If we haven't met the stable karma requirements, check if it has
met
commit 06659f9ab3437d1b74f3cb3c466226923d14df58
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Sep 10 17:40:34 2010 -0400
Fix a bug in our suggest reboot checkbox
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 92282df..e0c6eda 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -557,7 +557,7 @@ class Root(controllers.RootController):
'autokarma' : autokarma,
'stable_karma': stable_karma,
'unstable_karma': unstable_karma,
- 'suggest_reboot': suggest_reboot,
+ 'suggest_reboot': suggest_reboot and 'True' or
'',
}
# Basic sanity checks
commit d4414e2faed889aac1277f162549d4d775c57e41
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Sep 10 17:39:51 2010 -0400
Revert "Some initial tweaks to the CSS of the python-fedora login form"
This reverts commit 74749ac20792205ca90e1e4ada04f904aaf8f26c.
It broke more things than expected...
diff --git a/bodhi/static/css/layout.css b/bodhi/static/css/layout.css
index fdb1e94..f546154 100644
--- a/bodhi/static/css/layout.css
+++ b/bodhi/static/css/layout.css
@@ -495,43 +495,6 @@ p.padded {
padding-left: 10px;
}
-/* New python-fedora login form */
-
-label {
- text-align: right;
- vertical-align: top;
- background-color: #f1f1f1;
- float: left;
- clear: left;
- width: 100px;
- font-weight: bold;
- padding: 10px 10px 10px 100px;
-}
-
-#user_name {
- text-align: left;
- padding-top: 5px;
- padding-left: 5px;
- padding: 5px;
-}
-
-#password {
- text-align: left;
- padding-top: 5px;
- padding-left: 5px;
- padding: 5px;
-}
-
-#login-box form{
- border-collapse: collapse;
- border-bottom: 1px solid #bcbcbc;
- border-top: 1px solid #bcbcbc;
- width: 100%;
-}
-
-
-
-
/*
td.title {
text-align: right;
diff --git a/bodhi/templates/master.html b/bodhi/templates/master.html
index 3a55d03..6ee26c8 100644
--- a/bodhi/templates/master.html
+++ b/bodhi/templates/master.html
@@ -135,7 +135,7 @@ $(document).ready(function() {
<!-- footer BEGIN -->
<div id="fedora-footer">
Bodhi Version: ${version} -- Server: ${hostname}<br/>
- Copyright © 2007-2010 Red Hat, Inc. and others. All Rights
Reserved.<br/>
+ Copyright © 2007-2008 Red Hat, Inc. and others. All Rights
Reserved.<br/>
Licensed under the GNU Public License v2 or later.<br />
The Fedora Project is maintained and driven by the community and sponsored by Red
Hat.<br/>This is a community maintained site. Red Hat is not responsible for
content.<br/>
[ <a
href="http://fedoraproject.org/wiki/Legal">Legal</a>,
<a
href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines"&...
Guidelines</a> ]