Revision 9b3939ea
b/qa/qa_daemon.py | ||
---|---|---|
101 | 101 |
print qa_utils.FormatWarning(msg) |
102 | 102 |
|
103 | 103 |
|
104 |
@qa_utils.DefineHook('daemon-automatic-restart') |
|
104 | 105 |
def TestInstanceAutomaticRestart(node, instance): |
105 | 106 |
"""Test automatic restart of instance by ganeti-watcher. |
106 | 107 |
|
... | ... | |
122 | 123 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
123 | 124 |
|
124 | 125 |
|
126 |
@qa_utils.DefineHook('daemon-consecutive-failures') |
|
125 | 127 |
def TestInstanceConsecutiveFailures(node, instance): |
126 | 128 |
"""Test five consecutive instance failures. |
127 | 129 |
|
b/qa/qa_env.py | ||
---|---|---|
23 | 23 |
from ganeti import utils |
24 | 24 |
|
25 | 25 |
import qa_config |
26 |
import qa_utils |
|
26 | 27 |
|
27 | 28 |
from qa_utils import AssertEqual, StartSSH |
28 | 29 |
|
29 | 30 |
|
31 |
@qa_utils.DefineHook('env-ssh-connection') |
|
30 | 32 |
def TestSshConnection(): |
31 | 33 |
"""Test SSH connection. |
32 | 34 |
|
... | ... | |
35 | 37 |
AssertEqual(StartSSH(node['primary'], 'exit').wait(), 0) |
36 | 38 |
|
37 | 39 |
|
40 |
@qa_utils.DefineHook('env-ganeti-commands') |
|
38 | 41 |
def TestGanetiCommands(): |
39 | 42 |
"""Test availibility of Ganeti commands. |
40 | 43 |
|
... | ... | |
53 | 56 |
AssertEqual(StartSSH(node['primary'], cmd).wait(), 0) |
54 | 57 |
|
55 | 58 |
|
59 |
@qa_utils.DefineHook('env-icmp-ping') |
|
56 | 60 |
def TestIcmpPing(): |
57 | 61 |
"""ICMP ping each node. |
58 | 62 |
|
b/qa/qa_os.py | ||
---|---|---|
36 | 36 |
_TEMP_OS_PATH = os.path.join(constants.OS_SEARCH_PATH[0], _TEMP_OS_NAME) |
37 | 37 |
|
38 | 38 |
|
39 |
@qa_utils.DefineHook('os-list') |
|
39 | 40 |
def TestOsList(): |
40 | 41 |
"""gnt-os list""" |
41 | 42 |
master = qa_config.GetMasterNode() |
... | ... | |
45 | 46 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
46 | 47 |
|
47 | 48 |
|
49 |
@qa_utils.DefineHook('os-diagnose') |
|
48 | 50 |
def TestOsDiagnose(): |
49 | 51 |
"""gnt-os diagnose""" |
50 | 52 |
master = qa_config.GetMasterNode() |
... | ... | |
123 | 125 |
_RemoveTempOs(node, dir) |
124 | 126 |
|
125 | 127 |
|
128 |
@qa_utils.DefineHook('os-valid') |
|
126 | 129 |
def TestOsValid(): |
127 | 130 |
"""Testing valid OS definition""" |
128 | 131 |
return _TestOs(1) |
129 | 132 |
|
130 | 133 |
|
134 |
@qa_utils.DefineHook('os-invalid') |
|
131 | 135 |
def TestOsInvalid(): |
132 | 136 |
"""Testing invalid OS definition""" |
133 | 137 |
return _TestOs(0) |
134 | 138 |
|
135 | 139 |
|
140 |
@qa_utils.DefineHook('os-partially-valid') |
|
136 | 141 |
def TestOsPartiallyValid(): |
137 | 142 |
"""Testing partially valid OS definition""" |
138 | 143 |
return _TestOs(2) |
b/qa/qa_tags.py | ||
---|---|---|
55 | 55 |
utils.ShellQuoteArgs(cmd)).wait(), 0) |
56 | 56 |
|
57 | 57 |
|
58 |
@qa_utils.DefineHook('tags-cluster') |
|
58 | 59 |
def TestClusterTags(): |
59 | 60 |
"""gnt-cluster tags""" |
60 | 61 |
_TestTags(lambda subcmd: ['gnt-cluster', subcmd]) |
61 | 62 |
|
62 | 63 |
|
64 |
@qa_utils.DefineHook('tags-node') |
|
63 | 65 |
def TestNodeTags(node): |
64 | 66 |
"""gnt-node tags""" |
65 | 67 |
_TestTags(lambda subcmd: ['gnt-node', subcmd, node['primary']]) |
66 | 68 |
|
67 | 69 |
|
70 |
@qa_utils.DefineHook('tags-instance') |
|
68 | 71 |
def TestInstanceTags(instance): |
69 | 72 |
"""gnt-instance tags""" |
70 | 73 |
_TestTags(lambda subcmd: ['gnt-instance', subcmd, instance['name']]) |
Also available in: Unified diff