Revision 33ffda6c test/py/ganeti.backend_unittest.py
b/test/py/ganeti.backend_unittest.py | ||
---|---|---|
89 | 89 |
# this a real functional test, but requires localhost to be reachable |
90 | 90 |
local_data = (netutils.Hostname.GetSysName(), |
91 | 91 |
constants.IP4_ADDRESS_LOCALHOST) |
92 |
result = backend.VerifyNode({constants.NV_MASTERIP: local_data}, None, {}, {}, {}) |
|
92 |
result = backend.VerifyNode({constants.NV_MASTERIP: local_data}, |
|
93 |
None, {}, {}, {}) |
|
93 | 94 |
self.failUnless(constants.NV_MASTERIP in result, |
94 | 95 |
"Master IP data not returned") |
95 | 96 |
self.failUnless(result[constants.NV_MASTERIP], "Cannot reach localhost") |
... | ... | |
100 | 101 |
bad_data = ("master.example.com", "192.0.2.1") |
101 | 102 |
# we just test that whatever TcpPing returns, VerifyNode returns too |
102 | 103 |
netutils.TcpPing = lambda a, b, source=None: False |
103 |
result = backend.VerifyNode({constants.NV_MASTERIP: bad_data}, None, {}, {}, {}) |
|
104 |
result = backend.VerifyNode({constants.NV_MASTERIP: bad_data}, |
|
105 |
None, {}, {}, {}) |
|
104 | 106 |
self.failUnless(constants.NV_MASTERIP in result, |
105 | 107 |
"Master IP data not returned") |
106 | 108 |
self.failIf(result[constants.NV_MASTERIP], |
Also available in: Unified diff