~fwereade/pyjuju/go-place-unit

« back to all changes in this revision

Viewing changes to cmd/jujuc/server/config-get_test.go

  • Committer: William Reade
  • Author(s): William Reade
  • Date: 2012-05-18 09:53:36 UTC
  • mfrom: (142.5.6 go)
  • Revision ID: fwereade@gmail.com-20120518095336-51eg2laugtmqi1hf
implement open-port and close-port

(plus mild deduplication in tests)

R=niemeyer
CC=
https://codereview.appspot.com/6182046

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
        c.Assert(err, ErrorMatches, `unrecognized args: \["keys"\]`)
121
121
}
122
122
 
123
 
func (s *ConfigGetSuite) TestBadState(c *C) {
124
 
        s.ctx.State = nil
125
 
        com, err := s.ctx.NewCommand("config-get")
126
 
        c.Assert(com, IsNil)
127
 
        c.Assert(err, ErrorMatches, "context TestCtx cannot access state")
128
 
}
129
 
 
130
 
func (s *ConfigGetSuite) TestBadUnit(c *C) {
131
 
        s.ctx.LocalUnitName = ""
132
 
        com, err := s.ctx.NewCommand("config-get")
133
 
        c.Assert(com, IsNil)
134
 
        c.Assert(err, ErrorMatches, "context TestCtx is not attached to a unit")
 
123
func (s *ConfigGetSuite) TestUnitCommand(c *C) {
 
124
        s.AssertUnitCommand(c, "config-get")
135
125
}