Revision 283f9d4c
b/qa/ganeti-qa.py | ||
---|---|---|
103 | 103 |
if qa_config.TestEnabled('cluster-info'): |
104 | 104 |
RunTest(qa_cluster.TestClusterInfo) |
105 | 105 |
|
106 |
if qa_config.TestEnabled('cluster-getmaster'): |
|
107 |
RunTest(qa_cluster.TestClusterGetmaster) |
|
108 |
|
|
109 |
if qa_config.TestEnabled('cluster-version'): |
|
110 |
RunTest(qa_cluster.TestClusterVersion) |
|
111 |
|
|
106 | 112 |
if qa_config.TestEnabled('cluster-copyfile'): |
107 | 113 |
RunTest(qa_cluster.TestClusterCopyfile) |
108 | 114 |
|
... | ... | |
124 | 130 |
RunTest(qa_instance.TestInstanceShutdown, instance) |
125 | 131 |
RunTest(qa_instance.TestInstanceStartup, instance) |
126 | 132 |
|
133 |
if qa_config.TestEnabled('instance-list'): |
|
134 |
RunTest(qa_instance.TestInstanceList) |
|
135 |
|
|
127 | 136 |
if qa_config.TestEnabled('instance-info'): |
128 | 137 |
RunTest(qa_instance.TestInstanceInfo, instance) |
129 | 138 |
|
... | ... | |
138 | 147 |
try: |
139 | 148 |
name = RunTest(qa_instance.TestInstanceExport, instance, expnode) |
140 | 149 |
|
150 |
RunTest(qa_instance.TestBackupList, expnode) |
|
151 |
|
|
141 | 152 |
if qa_config.TestEnabled('instance-import'): |
142 | 153 |
newinst = qa_config.AcquireInstance() |
143 | 154 |
try: |
... | ... | |
149 | 160 |
finally: |
150 | 161 |
qa_config.ReleaseNode(expnode) |
151 | 162 |
|
163 |
if qa_config.TestEnabled('instance-reinstall'): |
|
164 |
RunTest(qa_instance.TestInstanceShutdown, instance) |
|
165 |
RunTest(qa_instance.TestInstanceReinstall, instance) |
|
166 |
RunTest(qa_instance.TestInstanceStartup, instance) |
|
167 |
|
|
152 | 168 |
if qa_config.TestEnabled('node-volumes'): |
153 | 169 |
RunTest(qa_node.TestNodeVolumes) |
154 | 170 |
|
b/qa/qa-sample.yaml | ||
---|---|---|
28 | 28 |
|
29 | 29 |
cluster-verify: True |
30 | 30 |
cluster-info: True |
31 |
cluster-getmaster: True |
|
32 |
cluster-version: True |
|
31 | 33 |
cluster-burnin: True |
32 | 34 |
cluster-copyfile: True |
33 | 35 |
cluster-master-failover: True |
... | ... | |
39 | 41 |
instance-add-plain-disk: True |
40 | 42 |
instance-add-local-mirror-disk: True |
41 | 43 |
instance-add-remote-raid-disk: True |
44 |
instance-list: True |
|
42 | 45 |
instance-failover: True |
43 | 46 |
instance-info: True |
44 | 47 |
instance-export: True |
45 | 48 |
instance-import: True |
49 |
instance-reinstall: True |
|
46 | 50 |
instance-shutdown: True |
47 | 51 |
|
48 | 52 |
# This test takes up to 6 minutes to complete |
b/qa/qa_cluster.py | ||
---|---|---|
53 | 53 |
|
54 | 54 |
def TestClusterVerify(): |
55 | 55 |
"""gnt-cluster verify""" |
56 |
cmd = ['gnt-cluster', 'verify'] |
|
57 | 56 |
master = qa_config.GetMasterNode() |
58 | 57 |
|
58 |
cmd = ['gnt-cluster', 'verify'] |
|
59 | 59 |
AssertEqual(StartSSH(master['primary'], |
60 | 60 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
61 | 61 |
|
62 | 62 |
|
63 | 63 |
def TestClusterInfo(): |
64 | 64 |
"""gnt-cluster info""" |
65 |
master = qa_config.GetMasterNode() |
|
66 |
|
|
65 | 67 |
cmd = ['gnt-cluster', 'info'] |
68 |
AssertEqual(StartSSH(master['primary'], |
|
69 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
70 |
|
|
71 |
|
|
72 |
def TestClusterGetmaster(): |
|
73 |
"""gnt-cluster getmaster""" |
|
66 | 74 |
master = qa_config.GetMasterNode() |
67 | 75 |
|
76 |
cmd = ['gnt-cluster', 'getmaster'] |
|
77 |
AssertEqual(StartSSH(master['primary'], |
|
78 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
79 |
|
|
80 |
|
|
81 |
def TestClusterVersion(): |
|
82 |
"""gnt-cluster version""" |
|
83 |
master = qa_config.GetMasterNode() |
|
84 |
|
|
85 |
cmd = ['gnt-cluster', 'version'] |
|
68 | 86 |
AssertEqual(StartSSH(master['primary'], |
69 | 87 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
70 | 88 |
|
... | ... | |
149 | 167 |
|
150 | 168 |
def TestClusterDestroy(): |
151 | 169 |
"""gnt-cluster destroy""" |
152 |
cmd = ['gnt-cluster', 'destroy', '--yes-do-it'] |
|
153 | 170 |
master = qa_config.GetMasterNode() |
154 | 171 |
|
172 |
cmd = ['gnt-cluster', 'destroy', '--yes-do-it'] |
|
155 | 173 |
AssertEqual(StartSSH(master['primary'], |
156 | 174 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
b/qa/qa_instance.py | ||
---|---|---|
102 | 102 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
103 | 103 |
|
104 | 104 |
|
105 |
def TestInstanceReinstall(instance): |
|
106 |
"""gnt-instance reinstall""" |
|
107 |
master = qa_config.GetMasterNode() |
|
108 |
|
|
109 |
cmd = ['gnt-instance', 'reinstall', '-f', instance['name']] |
|
110 |
AssertEqual(StartSSH(master['primary'], |
|
111 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
112 |
|
|
113 |
|
|
105 | 114 |
def TestInstanceFailover(instance): |
106 | 115 |
"""gnt-instance failover""" |
107 | 116 |
master = qa_config.GetMasterNode() |
... | ... | |
120 | 129 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
121 | 130 |
|
122 | 131 |
|
132 |
def TestInstanceList(): |
|
133 |
"""gnt-instance list""" |
|
134 |
master = qa_config.GetMasterNode() |
|
135 |
|
|
136 |
cmd = ['gnt-instance', 'list'] |
|
137 |
AssertEqual(StartSSH(master['primary'], |
|
138 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
|
139 |
|
|
140 |
|
|
123 | 141 |
def TestInstanceExport(instance, node): |
124 | 142 |
"""gnt-backup export""" |
125 | 143 |
master = qa_config.GetMasterNode() |
... | ... | |
145 | 163 |
cmd.append(newinst['name']) |
146 | 164 |
AssertEqual(StartSSH(master['primary'], |
147 | 165 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
166 |
|
|
167 |
|
|
168 |
def TestBackupList(expnode): |
|
169 |
"""gnt-backup list""" |
|
170 |
master = qa_config.GetMasterNode() |
|
171 |
|
|
172 |
cmd = ['gnt-backup', 'list', '--nodes=%s' % expnode['primary']] |
|
173 |
AssertEqual(StartSSH(master['primary'], |
|
174 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
Also available in: Unified diff