示例#1
0
func (s *BlockCommandSuite) TestBlockCmdMoreArgs(c *gc.C) {
	_, err := testing.RunCommand(c, block.NewDestroyCommand(), "change", "too much")
	c.Assert(
		err,
		gc.ErrorMatches,
		`.*can only specify block message.*`)
}
示例#2
0
func (s *BlockCommandSuite) TestBlockDestroyOperations(c *gc.C) {
	command := block.NewDestroyCommand()
	_, err := testing.RunCommand(c, command, "TestBlockDestroyOperations")
	c.Assert(err, jc.ErrorIsNil)
	s.assertBlock(c, command.Info().Name, "TestBlockDestroyOperations")
}
示例#3
0
func (s *BlockCommandSuite) TestBlockCmdNoMessage(c *gc.C) {
	command := block.NewDestroyCommand()
	_, err := testing.RunCommand(c, command)
	c.Assert(err, jc.ErrorIsNil)
	s.assertBlock(c, command.Info().Name, "")
}