Commit 18dc691f by Dudás Ádám

vm: test for flush operation

parent 221d4766
from django.test import TestCase from django.test import TestCase
from common.operations import operation_registry_name as op_reg_name from common.operations import operation_registry_name as op_reg_name
from vm.models import Instance from vm.models import Instance, Node
from vm.operations import ( from vm.operations import (
DeployOperation, DestroyOperation, MigrateOperation, DeployOperation, DestroyOperation, FlushOperation, MigrateOperation,
RebootOperation, RedeployOperation, ResetOperation, RebootOperation, RedeployOperation, ResetOperation,
SaveAsTemplateOperation, ShutdownOperation, ShutOffOperation, SaveAsTemplateOperation, ShutdownOperation, ShutOffOperation,
SleepOperation, WakeUpOperation, SleepOperation, WakeUpOperation,
...@@ -20,6 +20,11 @@ class DestroyOperationTestCase(TestCase): ...@@ -20,6 +20,11 @@ class DestroyOperationTestCase(TestCase):
assert DestroyOperation.id in getattr(Instance, op_reg_name) assert DestroyOperation.id in getattr(Instance, op_reg_name)
class FlushOperationTestCase(TestCase):
def test_operation_registered(self):
assert FlushOperation.id in getattr(Node, op_reg_name)
class MigrateOperationTestCase(TestCase): class MigrateOperationTestCase(TestCase):
def test_operation_registered(self): def test_operation_registered(self):
assert MigrateOperation.id in getattr(Instance, op_reg_name) assert MigrateOperation.id in getattr(Instance, op_reg_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment