~fwereade/juju-core/unit-remove-depart-scopes

« back to all changes in this revision

Viewing changes to state/api/agent/unit_test.go

  • Committer: William Reade
  • Date: 2013-11-07 17:30:38 UTC
  • mfrom: (2032.1.6 juju-core)
  • Revision ID: fwereade@gmail.com-20131107173038-d0a72q96dujotc0z
merge parent

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
        "launchpad.net/juju-core/state/api"
14
14
        "launchpad.net/juju-core/state/api/params"
15
15
        jc "launchpad.net/juju-core/testing/checkers"
 
16
        "launchpad.net/juju-core/utils"
16
17
)
17
18
 
18
19
var _ = gc.Suite(&unitSuite{})
29
30
        c.Assert(err, gc.IsNil)
30
31
        s.unit, err = svc.AddUnit()
31
32
        c.Assert(err, gc.IsNil)
32
 
        err = s.unit.SetPassword("unit-password")
 
33
        password, err := utils.RandomPassword()
 
34
        c.Assert(err, gc.IsNil)
 
35
        err = s.unit.SetPassword(password)
33
36
 
34
 
        s.st = s.OpenAPIAs(c, s.unit.Tag(), "unit-password")
 
37
        s.st = s.OpenAPIAs(c, s.unit.Tag(), password)
35
38
}
36
39
 
37
40
func (s *unitSuite) TestUnitEntity(c *gc.C) {