From c0d1a59d96a16c080ad8b8278251294cccc21894 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Tue, 10 Sep 2013 18:35:19 +0200 Subject: Fix detection of ETHx_IP context variable, add test. --- tests/unittests/test_datasource/test_opennebula.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/unittests') diff --git a/tests/unittests/test_datasource/test_opennebula.py b/tests/unittests/test_datasource/test_opennebula.py index f5103dc0..f2457657 100644 --- a/tests/unittests/test_datasource/test_opennebula.py +++ b/tests/unittests/test_datasource/test_opennebula.py @@ -173,6 +173,12 @@ class TestOpenNebulaDataSource(MockerTestCase): self.assertTrue('local-hostname' in results['metadata']) self.assertEqual(PUBLIC_IP, results['metadata']['local-hostname']) + def test_network_interfaces(self): + populate_context_dir(self.seed_dir, {'ETH0_IP': '1.2.3.4'}) + results = ds.read_context_disk_dir(self.seed_dir) + + self.assertTrue('network-interfaces' in results) + def test_find_candidates(self): def my_devs_with(criteria): return { -- cgit v1.2.3