Merge lp:~jtv/gwacl/compose-url into lp:gwacl
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | 74 |
Merged at revision: | 77 |
Proposed branch: | lp:~jtv/gwacl/compose-url |
Merge into: | lp:gwacl |
Diff against target: |
163 lines (+47/-20) 3 files modified
managementapi_test.go (+1/-1) x509session.go (+18/-15) x509session_test.go (+28/-4) |
To merge this branch: | bzr merge lp:~jtv/gwacl/compose-url |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email: mp+156104@code.launchpad.net |
Commit message
Make composeURL a method of x509Session, and clean up.
Description of the change
Making composeURL a method helps clarify its name (it composes a URL relative to the session) but also simplifies calls, because they no longer need to extract the session's subscription ID.
Those cleanups I mentioned were:
* Unit tests. There wasn't time for them earlier.
* Replaced the somewhat fuzzy "URL" and "URI" nomenclature with "path" for relative paths.
* Did away with some upper-casing in variable/parameter names that we've been told was undesirable.
* Checked against absolute paths, which composeURL wouldn't handle properly.
Finally, a few tests used absolute paths. So those now ran into that check I added, and I had to fix them up.
Jeroen