We weren't testing or making sensible use of the embedded errors in
NotFoundError and UnauthorizedError; we were doing inappropriate things
with both error types in various situations; the action of NotFoundf was
not consistent with Unauthorizedf.
These conditions no longer apply; and the various charm.Repository types
in
play now produce errors.NotFoundError instead of charm.NotFoundError.
I'm also more than somewhat freaked out by the "auth fails" magic
string.
Can anyone explain that?
Affected files:
A [revision details]
M charm/repo.go
M charm/repo_test.go
M cmd/juju/deploy_test.go
M cmd/juju/publish.go
M cmd/juju/upgradecharm_test.go
M cmd/jujud/agent_test.go
M cmd/jujud/bootstrap_test.go
M environs/dummy/storage.go
M environs/ec2/storage.go
M environs/imagemetadata/simplestreams.go
M environs/local/storage.go
M environs/maas/storage.go
M environs/openstack/storage.go
M environs/tools.go
M environs/tools_test.go
M errors/errors.go
A errors/errors_test.go
M state/apiserver/client_test.go
M state/apiserver/errors_test.go
M state/open.go
M state/state_test.go
M testing/charm.go
Reviewers: mp+168928_ code.launchpad. net,
Message:
Please take a look.
Description:
errors: tests, consistency
We weren't testing or making sensible use of the embedded errors in
NotFoundError and UnauthorizedError; we were doing inappropriate things
with both error types in various situations; the action of NotFoundf was
not consistent with Unauthorizedf.
These conditions no longer apply; and the various charm.Repository types NotFoundError instead of charm.NotFoundE rror.
in
play now produce errors.
I'm also more than somewhat freaked out by the "auth fails" magic
string.
Can anyone explain that?
https:/ /code.launchpad .net/~fwereade/ juju-core/ errors- cleanup/ +merge/ 168928
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/9830049/
Affected files: deploy_ test.go upgradecharm_ test.go agent_test. go bootstrap_ test.go dummy/storage. go ec2/storage. go imagemetadata/ simplestreams. go local/storage. go maas/storage. go openstack/ storage. go tools_test. go errors_ test.go /client_ test.go /errors_ test.go
A [revision details]
M charm/repo.go
M charm/repo_test.go
M cmd/juju/
M cmd/juju/publish.go
M cmd/juju/
M cmd/jujud/
M cmd/jujud/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/
M environs/tools.go
M environs/
M errors/errors.go
A errors/
M state/apiserver
M state/apiserver
M state/open.go
M state/state_test.go
M testing/charm.go