Beispiel #1
0
func (s *UnblockCommandSuite) assertRunUnblock(c *gc.C, operation string) {
	err := s.runUnblockCommand(c, operation)
	c.Assert(err, jc.ErrorIsNil)

	expectedOp := block.TypeFromOperation(strings.ToLower(operation))
	c.Assert(s.mockClient.BlockType, gc.DeepEquals, expectedOp)
}
Beispiel #2
0
func (s *BlockCommandSuite) assertBlock(c *gc.C, operation, message string) {
	expectedOp := block.TypeFromOperation(operation)
	c.Assert(s.mockClient.BlockType, gc.DeepEquals, expectedOp)
	c.Assert(s.mockClient.Msg, gc.DeepEquals, message)
}
Beispiel #3
0
// on switches on desired block and
// asserts that no errors were encountered.
func (s *CmdBlockHelper) on(c *gc.C, blockType, msg string) {
	c.Assert(s.blockClient.SwitchBlockOn(cmdblock.TypeFromOperation(blockType), msg), gc.IsNil)
}