summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2016-05-16 13:08:46 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2016-05-16 13:08:46 +0200
commitf5814e325dc083523337d34c7f459ca5b7f8ca07 (patch)
treee45cda66ad9c7dfcda358ad4b0d7667e45b4e3aa /tests
parent840d7620a279dec86e0b529e2a549967adee27fa (diff)
downloadhaircontrol-f5814e325dc083523337d34c7f459ca5b7f8ca07.zip
haircontrol-f5814e325dc083523337d34c7f459ca5b7f8ca07.tar.gz
haircontrol-f5814e325dc083523337d34c7f459ca5b7f8ca07.tar.bz2
Inspectors : add ToughSwitch. Tests : static hinting for switches. Discovery : go through all neighbours until all are inspected.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_discovery.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_discovery.py b/tests/test_discovery.py
index 06c61e3..ba30dab 100755
--- a/tests/test_discovery.py
+++ b/tests/test_discovery.py
@@ -14,8 +14,14 @@ class TestDiscovery(unittest.TestCase):
def test_wire_graph(self):
ref_net = data.EtherDomain() #json.load('../test-data/ref-output/equipments.json')
- self.discovery.discover_hinting_from_lldp(data.Equipment('stg2', '172.16.0.253'))
+ self.discovery.discover_lldp_hinting(data.Equipment('stg2', '172.16.0.253'))
+ self.discovery.discover_static_hinting([
+ ('SW_SergeGOUSSE', '172.16.30.23'),
+ ('SW_PI_EGL', '172.16.30.27'),
+ ('SW_Eglise_ESTANCARBON', '172.16.30.38'),
+ ])
self.discovery.discover_from_root(data.Equipment('stg', '172.16.0.254'))
+
self.assertEqual(ref_net.get_equipment_list_sorted(), list(self.discovery.net.get_equipment_list_sorted()))
if __name__ == '__main__':