Commit 452913ed authored by Iustin Pop's avatar Iustin Pop
Browse files

QA: add tests for the reserved lvs feature


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent f38ea602
...@@ -102,6 +102,9 @@ def RunClusterTests(): ...@@ -102,6 +102,9 @@ def RunClusterTests():
if qa_config.TestEnabled('cluster-verify'): if qa_config.TestEnabled('cluster-verify'):
RunTest(qa_cluster.TestClusterVerify) RunTest(qa_cluster.TestClusterVerify)
if qa_config.TestEnabled('cluster-reserved-lvs'):
RunTest(qa_cluster.TestClusterReservedLvs)
if qa_config.TestEnabled('cluster-rename'): if qa_config.TestEnabled('cluster-rename'):
RunTest(qa_cluster.TestClusterRename) RunTest(qa_cluster.TestClusterRename)
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
"cluster-renew-crypto": true, "cluster-renew-crypto": true,
"cluster-destroy": true, "cluster-destroy": true,
"cluster-rename": true, "cluster-rename": true,
"cluster-reserved-lvs": true,
"node-info": true, "node-info": true,
"node-volumes": true, "node-volumes": true,
......
...@@ -136,6 +136,27 @@ def TestClusterVerify(): ...@@ -136,6 +136,27 @@ def TestClusterVerify():
AssertEqual(StartSSH(master['primary'], AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), 0) utils.ShellQuoteArgs(cmd)).wait(), 0)
def TestClusterReservedLvs():
"""gnt-cluster reserved lvs"""
master = qa_config.GetMasterNode()
CVERIFY = ['gnt-cluster', 'verify']
for rcode, cmd in [
(0, CVERIFY),
(0, ['gnt-cluster', 'modify', '--reserved-lvs', '']),
(0, ['lvcreate', '-L1G', '-nqa-test', 'xenvg']),
(1, CVERIFY),
(0, ['gnt-cluster', 'modify', '--reserved-lvs', 'qa-test,other-test']),
(0, CVERIFY),
(0, ['gnt-cluster', 'modify', '--reserved-lvs', 'qa-.*']),
(0, CVERIFY),
(0, ['gnt-cluster', 'modify', '--reserved-lvs', '']),
(1, CVERIFY),
(0, ['lvremove', '-f', 'xenvg/qa-test']),
(0, CVERIFY),
]:
AssertEqual(StartSSH(master['primary'],
utils.ShellQuoteArgs(cmd)).wait(), rcode)
def TestClusterInfo(): def TestClusterInfo():
"""gnt-cluster info""" """gnt-cluster info"""
......
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