Merge lp://staging/~wallyworld/goose/null-project-description into lp://staging/goose
Status: | Merged |
---|---|
Approved by: | Ian Booth |
Approved revision: | 97 |
Merged at revision: | 96 |
Proposed branch: | lp://staging/~wallyworld/goose/null-project-description |
Merge into: | lp://staging/goose |
Diff against target: |
80 lines (+16/-11) 3 files modified
identity/keystone.go (+5/-4) nova/local_test.go (+6/-4) testservices/identityservice/userpass.go (+5/-3) |
To merge this branch: | bzr merge lp://staging/~wallyworld/goose/null-project-description |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+171011@code.staging.launchpad.net |
Commit message
Support null tenant description
Go 1.0.3 has a bug which means that if an encoded json string
value is null, unmarshalling fails unless the receiving field
is defined as a string pointer. This bug is fixed in Go 1.1.
This branch tweaks the tokenResponse struct so that auth can
still work under Go 1.0.3. A few driveby tests fixes were also
made since some tests we not setting up control hooks properly.
Description of the change
Support null tenant description
Go 1.0.3 has a bug which means that if an encoded json string
value is null, unmarshalling fails unless the receiving field
is defined as a string pointer. This bug is fixed in Go 1.1.
This branch tweaks the tokenResponse struct so that auth can
still work under Go 1.0.3. A few driveby tests fixes were also
made since some tests we not setting up control hooks properly.
Reviewers: mp+171011_ code.launchpad. net,
Message:
Please take a look.
Description:
Support null tenant description
Go 1.0.3 has a bug which means that if an encoded json string
value is null, unmarshalling fails unless the receiving field
is defined as a string pointer. This bug is fixed in Go 1.1.
This branch tweaks the tokenResponse struct so that auth can
still work under Go 1.0.3. A few driveby tests fixes were also
made since some tests we not setting up control hooks properly.
https:/ /code.launchpad .net/~wallyworl d/goose/ null-project- description/ +merge/ 171011
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/10478044/
Affected files: keystone. go identityservice /userpass. go
A [revision details]
M identity/
M nova/local_test.go
M testservices/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: identity/ keystone. go keystone. go' keystone. go 2013-05-08 21:24:11 +0000 keystone. go 2013-06-24 04:26:54 +0000 description" ` description" `
=== modified file 'identity/
--- identity/
+++ identity/
@@ -22,10 +22,10 @@
Expires string `json:"expires"`
Id string `json:"id"` // Actual token string
Tenant struct {
- Id string `json:"id"`
- Name string `json:"name"`
- Description string `json:"
- Enabled bool `json:"enabled"`
+ Id string `json:"id"`
+ Name string `json:"name"`
+ Description *string `json:"
+ Enabled bool `json:"enabled"`
} `json:"tenant"`
}
Index: nova/local_test.go test.go' ListFloatingIPs () Nova.RegisterCo ntrolPoint( "addFloatingIP" , Hook(s. openstack. Nova)) Nova.RegisterCo ntrolPoint( "addFloatingIP" , nil) Nova.RegisterCo ntrolPoint( "addFloatingIP" , Hook(s. openstack. Nova)) AllocateFloatin gIP() ate(c *C) { Identity. (*identityservi ce.UserPass) rolPoint( "authorisation" , s.authHook(up)) rolPoint( "authorisation" , s.authHook(up))
=== modified file 'nova/local_
--- nova/local_test.go 2013-04-24 11:08:15 +0000
+++ nova/local_test.go 2013-06-24 04:26:54 +0000
@@ -172,8 +172,8 @@
fips, err := novaClient.
c.Assert(err, IsNil)
c.Assert(fips, HasLen, 0)
- s.openstack.
s.addFloatingIP
- defer s.openstack.
+ cleanup := s.openstack.
s.addFloatingIP
+ defer cleanup()
s.noMoreIPs = true
fip, err := novaClient.
c.Assert(err, ErrorMatches, "(.|\n)*Zero floating ips available.*")
@@ -203,7 +203,8 @@
func (s *localLiveSuite) TestReauthentic
novaClient := s.setupClient(c, nil)
up := s.openstack.
- defer up.RegisterCont
+ cleanup := up.RegisterCont
+ defer cleanup()
// An invalid token is returned after the first authentication step, ateFailure( c *C) { Identity. (*id...
resulting in the ListServers call
// returning a 401. Subsequent authentication calls return the correct
token so the auth retry does it's job.
@@ -215,7 +216,8 @@
func (s *localLiveSuite) TestReauthentic
novaClient := s.setupClient(c, nil)
up := s.openstack.