~juju-qa/ubuntu/xenial/juju/xenial-2.0-beta3

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/cmd/modelcmd/modelcommand_test.go

  • Committer: Martin Packman
  • Date: 2016-03-30 19:31:08 UTC
  • mfrom: (1.1.41)
  • Revision ID: martin.packman@canonical.com-20160330193108-h9iz3ak334uk0z5r
Merge new upstream source 2.0~beta3

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
 
212
212
        s.store = jujuclienttesting.NewMemStore()
213
213
        s.store.Controllers[s.controllerName] = jujuclient.ControllerDetails{
214
 
                Servers:        []string{"0.1.2.3"},
215
214
                APIEndpoints:   apiInfo.Addrs,
216
215
                ControllerUUID: apiInfo.ModelTag.Id(),
217
216
                CACert:         apiInfo.CACert,
251
250
 
252
251
        cmd := modelcmd.NewModelCommandBase(s.store, s.controllerName, s.accountName, s.modelName)
253
252
        _, err := cmd.NewAPIRoot()
254
 
        c.Assert(err, gc.ErrorMatches, `getting controller info: model "my-controller:my-model" not found`)
 
253
        c.Assert(err, gc.ErrorMatches, "connecting with cached addresses: cannot get discharge.*")
255
254
}
256
255
 
257
256
func (s *macaroonLoginSuite) TestsUnknownUserLogin(c *gc.C) {
261
260
 
262
261
        cmd := modelcmd.NewModelCommandBase(s.store, s.controllerName, s.accountName, s.modelName)
263
262
        _, err := cmd.NewAPIRoot()
264
 
        c.Assert(err, gc.ErrorMatches, `getting controller info: model "my-controller:my-model" not found`)
 
263
        c.Assert(err, gc.ErrorMatches, "connecting with cached addresses: invalid entity name or password \\(unauthorized access\\)")
265
264
}