juju/testing: do not tear down connection if setup fails

Our test suite helpers are a double edged sword. They tend to expect the best, and blow up when the worst happens. This change is an example of this, if the setup phase failed, then what was a c.Assert("couldn't talk to mongo") becomes a panic when the tear down phase tries to close a connection which was never opened.
Fixed


On Thu, Jul 3, 2014 at 1:15 PM, Andrew Wilkins <notifications@github.com>
wrote:

> In juju/testing/conn.go:
>
> >  	}
> >  	dummy.Reset()
> > -	s.apiStates = nil
>
> I think we still need to set s.apiStates = nil, probably after the range
> over s.apiStates.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/juju/juju/pull/233/files#r14495535>.
>