~rogpeppe/juju-core/azure

« back to all changes in this revision

Viewing changes to state/unit_test.go

[r=dimitern] state/api: Deployer client-side facade.

Implemented all the necessary API calls for the
deployer worker. This is the last step needed
before the deployer can be refactored to use
only the API to talk to state.

Also fixed the StringsWatcher client implementation
(I initially got it wrong, but since nobody was using
it yet it got undetected).

Few other minor issues discovered and fixed in state,
adding tests as needed.

https://codereview.appspot.com/11342043/

R=fwereade, themue

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        c.Assert(err, checkers.Satisfies, errors.IsNotFoundError)
45
45
}
46
46
 
 
47
func (s *UnitSuite) TestUnitNameFromTag(c *C) {
 
48
        // Try both valid and invalid tag formats.
 
49
        c.Assert(state.UnitNameFromTag("unit-wordpress-0"), Equals, "wordpress/0")
 
50
        c.Assert(state.UnitNameFromTag("foo"), Equals, "")
 
51
}
 
52
 
47
53
func (s *UnitSuite) TestService(c *C) {
48
54
        svc, err := s.unit.Service()
49
55
        c.Assert(err, IsNil)