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") }
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, "") }