Merge lp:~joe-arnold/swift/bug800348 into lp:~hudson-openstack/swift/trunk

Proposed by Joe Arnold
Status: Merged
Approved by: gholt
Approved revision: 317
Merged at revision: 320
Proposed branch: lp:~joe-arnold/swift/bug800348
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 40 lines (+19/-1)
2 files modified
swift/common/middleware/tempauth.py (+1/-1)
test/unit/common/middleware/test_tempauth.py (+18/-0)
To merge this branch: bzr merge lp:~joe-arnold/swift/bug800348
Reviewer Review Type Date Requested Status
gholt (community) Approve
John Dickinson Approve
Review via email: mp+65404@code.launchpad.net

Description of the change

Fixed a bug800348, where users failed to be created if bind_port wasn't defined in the config.

To post a comment you must log in.
lp:~joe-arnold/swift/bug800348 updated
317. By Joe Arnold <<email address hidden>

Changed port for storage ural to the documented 8080

Revision history for this message
gholt (gholt) wrote :

Looks great Joe. Would you mind signing the CLA as per http://wiki.openstack.org/HowToContribute and putting your info on http://wiki.openstack.org/Contributors ? The Powers That Be require that for all contributors.

review: Needs Information
Revision history for this message
Joe Arnold (joe-arnold) wrote :

Sorry about the oversight. Just added my EchoSign Tx ID to http://wiki.openstack.org/Contributors

Revision history for this message
John Dickinson (notmyname) wrote :

lgtm

review: Approve
Revision history for this message
gholt (gholt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'swift/common/middleware/tempauth.py'
2--- swift/common/middleware/tempauth.py 2011-06-09 21:02:30 +0000
3+++ swift/common/middleware/tempauth.py 2011-06-21 23:09:30 +0000
4@@ -85,7 +85,7 @@
5 if ip == '0.0.0.0':
6 ip = '127.0.0.1'
7 url += ip
8- url += ':' + conf.get('bind_port', 80) + '/v1/' + \
9+ url += ':' + conf.get('bind_port', '8080') + '/v1/' + \
10 self.reseller_prefix + conf_key.split('_')[1]
11 groups = values
12 self.users[conf_key.split('_', 1)[1].replace('_', ':')] = {
13
14=== modified file 'test/unit/common/middleware/test_tempauth.py'
15--- test/unit/common/middleware/test_tempauth.py 2011-05-26 02:24:12 +0000
16+++ test/unit/common/middleware/test_tempauth.py 2011-06-21 23:09:30 +0000
17@@ -384,5 +384,23 @@
18 self.assertEquals(resp.status_int, 401)
19
20
21+class TestParseUserCreation(unittest.TestCase):
22+ def test_parse_user_creation(self):
23+ auth_filter = auth.filter_factory({
24+ 'user_test_tester3': 'testing',
25+ 'user_admin_admin': 'admin .admin .reseller_admin',
26+ })(FakeApp())
27+ self.assertEquals(auth_filter.users, {
28+ 'admin:admin': {
29+ 'url': 'http://127.0.0.1:8080/v1/AUTH_admin',
30+ 'groups': ['.admin', '.reseller_admin'],
31+ 'key': 'admin'
32+ }, 'test:tester3': {
33+ 'url': 'http://127.0.0.1:8080/v1/AUTH_test',
34+ 'groups': [],
35+ 'key': 'testing'
36+ },
37+ })
38+
39 if __name__ == '__main__':
40 unittest.main()