LGTM, thanks for doing this!
https://codereview.appspot.com/67750045/diff/1/state/api/params/internal.go File state/api/params/internal.go (right):
https://codereview.appspot.com/67750045/diff/1/state/api/params/internal.go#newcode509 state/api/params/internal.go:509: // CharmsResponse is the server response to charm upload or get requests. s/get/GET/
https://codereview.appspot.com/67750045/diff/1/state/apiserver/charms.go File state/apiserver/charms.go (right):
https://codereview.appspot.com/67750045/diff/1/state/apiserver/charms.go#newcode540 state/apiserver/charms.go:540: if !strings.HasPrefix(filePath, bundlePath+"/") { Please, use filepath.Dir(filePath) != bundlePath here instead.
https://codereview.appspot.com/67750045/diff/1/state/apiserver/charms_test.go File state/apiserver/charms_test.go (right):
https://codereview.appspot.com/67750045/diff/1/state/apiserver/charms_test.go#newcode249 state/apiserver/charms_test.go:249: "expected url=CharmURL query argument") I'd prefer if you formatted this and other places where assertErrorResponse is too long, like this:
s.assertErrorResponse( c, resp, http.StatusBadRequest, expected url=CharmURL query argument", )
https://codereview.appspot.com/67750045/
« Back to merge proposal
LGTM, thanks for doing this!
https:/ /codereview. appspot. com/67750045/ diff/1/ state/api/ params/ internal. go params/ internal. go (right):
File state/api/
https:/ /codereview. appspot. com/67750045/ diff/1/ state/api/ params/ internal. go#newcode509 params/ internal. go:509: // CharmsResponse is the server
state/api/
response to charm upload or get requests.
s/get/GET/
https:/ /codereview. appspot. com/67750045/ diff/1/ state/apiserver /charms. go /charms. go (right):
File state/apiserver
https:/ /codereview. appspot. com/67750045/ diff/1/ state/apiserver /charms. go#newcode540 /charms. go:540: if !strings. HasPrefix( filePath, Dir(filePath) != bundlePath here instead.
state/apiserver
bundlePath+"/") {
Please, use filepath.
https:/ /codereview. appspot. com/67750045/ diff/1/ state/apiserver /charms_ test.go /charms_ test.go (right):
File state/apiserver
https:/ /codereview. appspot. com/67750045/ diff/1/ state/apiserver /charms_ test.go# newcode249 /charms_ test.go: 249: "expected url=CharmURL query
state/apiserver
argument")
I'd prefer if you formatted this and other places where
assertErrorResponse is too long, like this:
s.assertErrorRe sponse( equest,
c, resp, http.StatusBadR
expected url=CharmURL query argument",
)
https:/ /codereview. appspot. com/67750045/