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

« back to all changes in this revision

Viewing changes to src/github.com/juju/juju/worker/machiner/machiner_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:
131
131
        )
132
132
        s.accessor.machine.CheckCall(
133
133
                c, 5, "SetStatus",
134
 
                status.StatusStopped,
 
134
                status.Stopped,
135
135
                "",
136
136
                map[string]interface{}(nil),
137
137
        )
232
232
        }, {
233
233
                FuncName: "SetStatus",
234
234
                Args: []interface{}{
235
 
                        status.StatusStarted,
 
235
                        status.Started,
236
236
                        "",
237
237
                        map[string]interface{}(nil),
238
238
                },
245
245
        }, {
246
246
                FuncName: "SetStatus",
247
247
                Args: []interface{}{
248
 
                        status.StatusStopped,
 
248
                        status.Stopped,
249
249
                        "",
250
250
                        map[string]interface{}(nil),
251
251
                },
371
371
func (s *MachinerStateSuite) TestStartSetsStatus(c *gc.C) {
372
372
        statusInfo, err := s.machine.Status()
373
373
        c.Assert(err, jc.ErrorIsNil)
374
 
        c.Assert(statusInfo.Status, gc.Equals, status.StatusPending)
 
374
        c.Assert(statusInfo.Status, gc.Equals, status.Pending)
375
375
        c.Assert(statusInfo.Message, gc.Equals, "")
376
376
 
377
377
        mr := s.makeMachiner(c, false, nil)
378
378
        defer worker.Stop(mr)
379
379
 
380
 
        s.waitMachineStatus(c, s.machine, status.StatusStarted)
 
380
        s.waitMachineStatus(c, s.machine, status.Started)
381
381
}
382
382
 
383
383
func (s *MachinerStateSuite) TestSetsStatusWhenDying(c *gc.C) {
384
384
        mr := s.makeMachiner(c, false, nil)
385
385
        defer worker.Stop(mr)
386
386
        c.Assert(s.machine.Destroy(), jc.ErrorIsNil)
387
 
        s.waitMachineStatus(c, s.machine, status.StatusStopped)
 
387
        s.waitMachineStatus(c, s.machine, status.Stopped)
388
388
}
389
389
 
390
390
func (s *MachinerStateSuite) TestSetDead(c *gc.C) {