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

« back to all changes in this revision

Viewing changes to worker/uniter/filter_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:
17
17
        "launchpad.net/juju-core/state/api/params"
18
18
        apiuniter "launchpad.net/juju-core/state/api/uniter"
19
19
        coretesting "launchpad.net/juju-core/testing"
 
20
        "launchpad.net/juju-core/utils"
20
21
        "launchpad.net/juju-core/worker"
21
22
)
22
23
 
53
54
}
54
55
 
55
56
func (s *FilterSuite) APILogin(c *gc.C, unit *state.Unit) {
56
 
        err := unit.SetPassword("password")
57
 
        c.Assert(err, gc.IsNil)
58
 
        s.st = s.OpenAPIAs(c, unit.Tag(), "password")
 
57
        password, err := utils.RandomPassword()
 
58
        c.Assert(err, gc.IsNil)
 
59
        err = unit.SetPassword(password)
 
60
        c.Assert(err, gc.IsNil)
 
61
        s.st = s.OpenAPIAs(c, unit.Tag(), password)
59
62
        s.uniter = s.st.Uniter()
60
63
        c.Assert(s.uniter, gc.NotNil)
61
64
}