Ejemplo n.º 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.*`)
}
Ejemplo n.º 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")
}
Ejemplo n.º 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, "")
}