Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2739)

Issue 13808043: state, testing: fix for mongo >2.2

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by rog
Modified:
10 years, 7 months ago
Reviewers:
gz, mp+186839
Visibility:
Public.

Description

state, testing: fix for mongo >2.2 As reported by sinzui on #juju-dev, the tests fail when run against mongod 2.4.5. This should fix that. I've left the two isUnauthorized functions duplicated for dependency-hygiene reasons. Plus a drive-by fix to a sporadic test failure in environs-cloudinit - the regexp didn't admit all base64 characters. https://code.launchpad.net/~rogpeppe/juju-core/409-fix-for-mongo.2.4/+merge/186839 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : state, testing: fix for mongo >2.2 #

Patch Set 3 : state, testing: fix for mongo >2.2 #

Total comments: 6

Patch Set 4 : state, testing: fix for mongo >2.2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -11 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M state/open.go View 1 1 chunk +19 lines, -7 lines 0 comments Download
M testing/mgo.go View 1 1 chunk +12 lines, -3 lines 0 comments Download

Messages

Total messages: 5
rog
Please take a look.
10 years, 7 months ago (2013-09-20 17:11:08 UTC) #1
gz
LGTM, even with the duplicated function which I'm not wild about it's an improvement on ...
10 years, 7 months ago (2013-09-20 17:26:23 UTC) #2
gz
https://codereview.appspot.com/13808043/diff/6001/environs/cloudinit/cloudinit_test.go File environs/cloudinit/cloudinit_test.go (right): https://codereview.appspot.com/13808043/diff/6001/environs/cloudinit/cloudinit_test.go#newcode278 environs/cloudinit/cloudinit_test.go:278: re := regexp.MustCompile(`--env-config '([\w,=+/]+)'`) On 2013/09/20 17:26:24, gz wrote: ...
10 years, 7 months ago (2013-09-20 17:33:35 UTC) #3
rog
Please take a look. https://codereview.appspot.com/13808043/diff/6001/state/open.go File state/open.go (right): https://codereview.appspot.com/13808043/diff/6001/state/open.go#newcode200 state/open.go:200: if err, ok := err.(*mgo.QueryError); ...
10 years, 7 months ago (2013-09-20 17:36:23 UTC) #4
rog
10 years, 7 months ago (2013-09-20 17:38:38 UTC) #5
https://codereview.appspot.com/13808043/diff/6001/environs/cloudinit/cloudini...
File environs/cloudinit/cloudinit_test.go (right):

https://codereview.appspot.com/13808043/diff/6001/environs/cloudinit/cloudini...
environs/cloudinit/cloudinit_test.go:278: re := regexp.MustCompile(`--env-config
'([\w,=+/]+)'`)
On 2013/09/20 17:26:24, gz wrote:
> So, are we using standard base64 or urlsafe base64? Feels like we should know,
> rather than just matching both.

Standard, but on reflection there's no particular reason to duplicate the base64
alphabet here. I've simplified the regexp - the test is actually stronger that
way in fact because the base64 decoder will barf if it finds a non-standard
character.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b