コード例 #1
0
ファイル: list_test.go プロジェクト: pmatulis/juju
func (s *ListSuite) TestUnrecognizedArg(c *gc.C) {
	_, err := testing.RunCommand(c, controller.NewListCommandForTest(s.store), "whoops")
	c.Assert(err, gc.ErrorMatches, `unrecognized args: \["whoops"\]`)
}
コード例 #2
0
ファイル: list_test.go プロジェクト: pmatulis/juju
func (s *ListSuite) TestListSystemsError(c *gc.C) {
	s.store = errorStore{err: errors.New("cannot read info")}
	_, err := testing.RunCommand(c, controller.NewListCommandForTest(s.store))
	c.Assert(err, gc.ErrorMatches, "failed to list controllers in config store: cannot read info")
}
コード例 #3
0
ファイル: list_test.go プロジェクト: pmatulis/juju
func (s *ListSuite) TestControllerList(c *gc.C) {
	context, err := testing.RunCommand(c, controller.NewListCommandForTest(s.store))
	c.Assert(err, jc.ErrorIsNil)
	c.Assert(testing.Stdout(context), gc.Equals, "test1\ntest3\n")
}