From b42f101631c16fe066e33f34270a2b58722455e4 Mon Sep 17 00:00:00 2001 From: Andrew Wilkins Date: Wed, 10 May 2017 10:58:20 +0800 Subject: [PATCH] cmd/modelcmd: use FakeJujuXDGDataHomeSuite Use FakeJujuXDGDataHomeSuite to initialise the "XDG" home directory for tests, isolating them from one another. We were setting a fake home directory which isn't sufficient for Windows. --- cmd/modelcmd/apicontext_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmd/modelcmd/apicontext_test.go b/cmd/modelcmd/apicontext_test.go index e315e6d8bb6..5801ed6ad5e 100644 --- a/cmd/modelcmd/apicontext_test.go +++ b/cmd/modelcmd/apicontext_test.go @@ -5,22 +5,17 @@ import ( "net/http" "net/http/httptest" - "github.com/juju/testing" jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" "gopkg.in/macaroon-bakery.v1/httpbakery" "github.com/juju/juju/cmd/modelcmd" "github.com/juju/juju/jujuclient" + "github.com/juju/juju/testing" ) type APIContextSuite struct { - testing.IsolationSuite -} - -func (s *APIContextSuite) SetUpTest(c *gc.C) { - s.IsolationSuite.SetUpTest(c) - testing.MakeFakeHome(c) + testing.FakeJujuXDGDataHomeSuite } var _ = gc.Suite(&APIContextSuite{})