Revision 09470dd8
b/Makefile.am | ||
---|---|---|
506 | 506 |
qa/qa_error.py \ |
507 | 507 |
qa/qa_group.py \ |
508 | 508 |
qa/qa_instance.py \ |
509 |
qa/qa_job.py \ |
|
509 | 510 |
qa/qa_node.py \ |
510 | 511 |
qa/qa_os.py \ |
511 | 512 |
qa/qa_rapi.py \ |
b/qa/ganeti-qa.py | ||
---|---|---|
38 | 38 |
import qa_instance |
39 | 39 |
import qa_node |
40 | 40 |
import qa_os |
41 |
import qa_job |
|
41 | 42 |
import qa_rapi |
42 | 43 |
import qa_tags |
43 | 44 |
import qa_utils |
... | ... | |
130 | 131 |
# Test on empty cluster |
131 | 132 |
RunTestIf("node-list", qa_node.TestNodeList) |
132 | 133 |
RunTestIf("instance-list", qa_instance.TestInstanceList) |
134 |
RunTestIf("job-list", qa_job.TestJobList) |
|
133 | 135 |
|
134 | 136 |
RunTestIf("create-cluster", qa_node.TestNodeAddAll) |
135 | 137 |
if not qa_config.TestEnabled("create-cluster"): |
... | ... | |
146 | 148 |
# Test listing fields |
147 | 149 |
RunTestIf("node-list", qa_node.TestNodeListFields) |
148 | 150 |
RunTestIf("instance-list", qa_instance.TestInstanceListFields) |
151 |
RunTestIf("job-list", qa_job.TestJobListFields) |
|
149 | 152 |
|
150 | 153 |
RunTestIf("node-info", qa_node.TestNodeInfo) |
151 | 154 |
|
... | ... | |
290 | 293 |
# Lists instances, too |
291 | 294 |
RunTestIf("node-list", qa_node.TestNodeList) |
292 | 295 |
|
296 |
# Some jobs have been run, let's test listing them |
|
297 |
RunTestIf("job-list", qa_job.TestJobList) |
|
298 |
|
|
293 | 299 |
|
294 | 300 |
def RunCommonNodeTests(): |
295 | 301 |
"""Run a few common node tests. |
b/qa/qa-sample.json | ||
---|---|---|
113 | 113 |
"instance-rename": true, |
114 | 114 |
"instance-shutdown": true, |
115 | 115 |
|
116 |
"job-list": true, |
|
117 |
|
|
116 | 118 |
"# cron/ganeti-watcher should be disabled for these tests": null, |
117 | 119 |
"instance-automatic-restart": false, |
118 | 120 |
"instance-consecutive-failures": false, |
b/qa/qa_job.py | ||
---|---|---|
1 |
# |
|
2 |
# |
|
3 |
|
|
4 |
# Copyright (C) 2012 Google Inc. |
|
5 |
# |
|
6 |
# This program is free software; you can redistribute it and/or modify |
|
7 |
# it under the terms of the GNU General Public License as published by |
|
8 |
# the Free Software Foundation; either version 2 of the License, or |
|
9 |
# (at your option) any later version. |
|
10 |
# |
|
11 |
# This program is distributed in the hope that it will be useful, but |
|
12 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
14 |
# General Public License for more details. |
|
15 |
# |
|
16 |
# You should have received a copy of the GNU General Public License |
|
17 |
# along with this program; if not, write to the Free Software |
|
18 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
19 |
# 02110-1301, USA. |
|
20 |
|
|
21 |
|
|
22 |
"""Job-related QA tests. |
|
23 |
|
|
24 |
""" |
|
25 |
|
|
26 |
from ganeti import query |
|
27 |
|
|
28 |
import qa_utils |
|
29 |
|
|
30 |
|
|
31 |
def TestJobList(): |
|
32 |
"""gnt-job list""" |
|
33 |
qa_utils.GenericQueryTest("gnt-job", query.JOB_FIELDS.keys()) |
|
34 |
|
|
35 |
|
|
36 |
def TestJobListFields(): |
|
37 |
"""gnt-node list-fields""" |
|
38 |
qa_utils.GenericQueryFieldsTest("gnt-job", query.JOB_FIELDS.keys()) |
Also available in: Unified diff