Commit 42a769f9 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno Committed by Iustin Pop

Add tests for parameter "always_failover"

Signed-off-by: default avatarBernardo Dal Seno <bdalseno@google.com>
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 11dc66f3
......@@ -187,6 +187,18 @@ def TestInstanceMigrate(instance):
instance["name"]])
AssertCommand(["gnt-instance", "start", instance["name"]])
AssertCommand(cmd)
AssertCommand(["gnt-instance", "modify", "-B",
("%s=%s" %
(constants.BE_ALWAYS_FAILOVER, constants.VALUE_TRUE)),
instance["name"]])
AssertCommand(cmd, fail=True)
AssertCommand(["gnt-instance", "migrate", "--force", "--allow-failover",
instance["name"]])
AssertCommand(["gnt-instance", "modify", "-B",
("%s=%s" %
(constants.BE_ALWAYS_FAILOVER, constants.VALUE_FALSE)),
instance["name"]])
AssertCommand(cmd)
def TestInstanceInfo(instance):
......@@ -211,6 +223,8 @@ def TestInstanceModify(instance):
["-B", "%s=2" % constants.BE_VCPUS],
["-B", "%s=1" % constants.BE_VCPUS],
["-B", "%s=%s" % (constants.BE_VCPUS, constants.VALUE_DEFAULT)],
["-B", "%s=%s" % (constants.BE_ALWAYS_FAILOVER, constants.VALUE_TRUE)],
["-B", "%s=%s" % (constants.BE_ALWAYS_FAILOVER, constants.VALUE_DEFAULT)],
["-H", "%s=%s" % (constants.HV_KERNEL_PATH, test_kernel)],
["-H", "%s=%s" % (constants.HV_KERNEL_PATH, constants.VALUE_DEFAULT)],
......
......@@ -823,7 +823,8 @@ class TestInstanceCreation(testutils.GanetiTestCase):
{ constants.BE_VCPUS: 2,
constants.BE_MAXMEM: 1024,
constants.BE_MINMEM: 1024,
constants.BE_AUTO_BALANCE: True, }
constants.BE_AUTO_BALANCE: True,
constants.BE_ALWAYS_FAILOVER: True, }
]
hvparam_variants = [
......
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 to comment