DescriptionFix for bug 1225483
(bug 1225483: "Error when trying to deploy without a network connection isn't user friendly.")
Running "juju deploy" without an internet connection fails in
CharmStore.Info(), so I modified the error handling of the HTTP
request issued there.
Two errors are possible: If a DNS lookup is necessary, net.DNSError
is raised; if the client machine locally caches DNS, net.OpError
is raised, so both errors are "translated" into the new error
message.
Testing the net.OpError case the naive way is time consuming: I considered
to use charm.NewStore("http://192.0.2.0"): The network 192.0.2.0/24
is a testing network, so access to this address indeed laed reliably
to an error, but it can be a timeout error -- after 30 seconds or so.
(Without an internet connection, one would get an immedieate "no route
to host" error). So I copped out from writing a specific test for this
case...
https://code.launchpad.net/~adeuring/juju-core/1225483/+merge/202699
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 1
MessagesTotal messages: 2
|