Merge lp:~jameinel/goose/handle-missing-endpoint into lp:goose
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~jameinel/goose/handle-missing-endpoint |
Merge into: | lp:goose |
Diff against target: |
150 lines (+83/-27) 3 files modified
identity/live_test.go (+3/-3) identity/userpass.go (+41/-24) identity/userpass_test.go (+39/-0) |
To merge this branch: | bzr merge lp:~jameinel/goose/handle-missing-endpoint |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+145098@code.launchpad.net |
Commit message
identity: Handle when a service is available, but only in a region we aren't currently using.
Add -live tests for the identity suite. Refactor a bit and test the parsing logic to ensure we don't get panic() when talking to canonistack.
Description of the change
With the recent changes to canonistack, we now have a service that is only exposed on lcy02. (fakecinder, I believe).
This was causing failures in the nova test suite (it panic'd because of accessing the 0th item of an empty array).
While doing this, I realized we didn't have any live tests focusing on the identity level, so I added some. This also was easier to test by refactoring it out into smaller helper functions, rather than having everything done inside the request processing.
Because the UserPass object doesn't have much state (none that I needed), I just made them free functions, but I would consider having them as struct methods if people like that more.