Example #1
0
func (s *ConstraintsCommandsSuite) assertGetError(c *gc.C, code int, stderr string, args ...string) {
	command := cmdcommon.NewGetConstraintsCommandWithAPI(s.fake)
	rcode, rstdout, rstderr := runCmdLine(c, command, args...)
	c.Assert(rcode, gc.Equals, code)
	c.Assert(rstdout, gc.Equals, "")
	c.Assert(rstderr, gc.Matches, "error: "+stderr+"\n")
}
Example #2
0
func (s *ConstraintsCommandsSuite) assertGet(c *gc.C, stdout string, args ...string) {
	command := cmdcommon.NewGetConstraintsCommandWithAPI(s.fake)
	rcode, rstdout, rstderr := runCmdLine(c, command, args...)
	c.Assert(rcode, gc.Equals, 0)
	c.Assert(rstdout, gc.Equals, stdout)
	c.Assert(rstderr, gc.Equals, "")
}