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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/juju/api_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
        c.Assert(found.AgentVersion, gc.Equals, "1.2.3")
374
374
        c.Assert(found.ModelCount, gc.IsNil)
375
375
        c.Assert(found.MachineCount, gc.IsNil)
 
376
        c.Assert(found.ControllerMachineCount, gc.Equals, 0)
376
377
}
377
378
 
378
379
func (s *CacheAPIEndpointsSuite) assertControllerUpdated(c *gc.C, name string) {
405
406
func (s *CacheAPIEndpointsSuite) TestUpdateModelMachineCount(c *gc.C) {
406
407
        s.assertCreateController(c, "controller-name1")
407
408
        params := juju.UpdateControllerParams{
408
 
                AgentVersion: "1.2.3",
409
 
                ModelCount:   intptr(2),
410
 
                MachineCount: intptr(3),
 
409
                AgentVersion:           "1.2.3",
 
410
                ControllerMachineCount: intptr(1),
 
411
                ModelCount:             intptr(2),
 
412
                MachineCount:           intptr(3),
411
413
        }
412
414
        err := juju.UpdateControllerDetailsFromLogin(s.ControllerStore, "controller-name1", params)
413
415
        c.Assert(err, jc.ErrorIsNil)
416
418
        c.Assert(controllerDetails.UnresolvedAPIEndpoints, gc.HasLen, 0)
417
419
        c.Assert(controllerDetails.APIEndpoints, gc.HasLen, 0)
418
420
        c.Assert(controllerDetails.AgentVersion, gc.Equals, "1.2.3")
 
421
        c.Assert(controllerDetails.ControllerMachineCount, gc.Equals, 1)
419
422
        c.Assert(*controllerDetails.ModelCount, gc.Equals, 2)
420
423
        c.Assert(*controllerDetails.MachineCount, gc.Equals, 3)
421
424
}