Skip to content

Commit

Permalink
Merge pull request #7321 from axw/cmd-modelcmd-cookie-home
Browse files Browse the repository at this point in the history
cmd/modelcmd: use FakeJujuXDGDataHomeSuite

## Description of change

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.

## QA steps

Run the tests.

## Documentation changes

None.

## Bug reference

None.
  • Loading branch information
jujubot committed May 10, 2017
2 parents 4826b94 + b42f101 commit e634386
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cmd/modelcmd/apicontext_test.go
Expand Up @@ -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{})
Expand Down

0 comments on commit e634386

Please sign in to comment.