Revision 7fcf849f testing/ganeti.utils_unittest.py
b/testing/ganeti.utils_unittest.py | ||
---|---|---|
136 | 136 |
result = RunCmd("/bin/sh -c 'kill -15 $$'") |
137 | 137 |
self.assertEqual(result.signal, 15) |
138 | 138 |
|
139 |
def testListRun(self): |
|
140 |
"""Test list runs""" |
|
141 |
result = RunCmd(["true"]) |
|
142 |
self.assertEqual(result.signal, None) |
|
143 |
self.assertEqual(result.exit_code, 0) |
|
144 |
result = RunCmd(["/bin/sh", "-c", "exit 1"]) |
|
145 |
self.assertEqual(result.signal, None) |
|
146 |
self.assertEqual(result.exit_code, 1) |
|
147 |
result = RunCmd(["echo", "-n", self.magic]) |
|
148 |
self.assertEqual(result.signal, None) |
|
149 |
self.assertEqual(result.exit_code, 0) |
|
150 |
self.assertEqual(result.stdout, self.magic) |
|
151 |
|
|
139 | 152 |
|
140 | 153 |
class TestRemoveFile(unittest.TestCase): |
141 | 154 |
"""Test case for the RemoveFile function""" |
Also available in: Unified diff