aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests
diff options
context:
space:
mode:
authorFrederic Lepied <frederic.lepied@enovance.com>2015-02-05 22:17:42 +0100
committerFrederic Lepied <frederic.lepied@redhat.com>2015-08-02 18:19:37 +0200
commit103b87aa82cfd298b664fe1314e987bd953ec20d (patch)
treee5691490fff33868291a6e8de946b8b8ac427ffe /os_net_config/tests
parentcb578ed9b94ff9a34b41d91ada94e3375436b60c (diff)
Allow to specify the root directory of the filesystem
Change-Id: Ice1b8d17804cf7a0aafd308945a5e960fe927bbc
Diffstat (limited to 'os_net_config/tests')
-rw-r--r--os_net_config/tests/test_cli.py9
-rw-r--r--os_net_config/tests/test_impl_eni.py2
2 files changed, 10 insertions, 1 deletions
diff --git a/os_net_config/tests/test_cli.py b/os_net_config/tests/test_cli.py
index d3de720..310a527 100644
--- a/os_net_config/tests/test_cli.py
+++ b/os_net_config/tests/test_cli.py
@@ -112,3 +112,12 @@ class TestCli(base.TestCase):
for dev in sanity_devices:
self.assertIn(dev, stdout_yaml)
self.assertEqual(stdout_yaml, stdout_json)
+
+ def test_bridge_noop_rootfs(self):
+ for provider in ('ifcfg', 'eni'):
+ bond_yaml = os.path.join(SAMPLE_BASE, 'bridge_dhcp.yaml')
+ stdout_yaml, stderr = self.run_cli('ARG0 --provider=%s --noop '
+ '--root-dir=/rootfs '
+ '-c %s' % (provider, bond_yaml))
+ self.assertEqual('', stderr)
+ self.assertIn('File: /rootfs/', stdout_yaml)
diff --git a/os_net_config/tests/test_impl_eni.py b/os_net_config/tests/test_impl_eni.py
index e5a712e..fe49c3e 100644
--- a/os_net_config/tests/test_impl_eni.py
+++ b/os_net_config/tests/test_impl_eni.py
@@ -209,7 +209,7 @@ class TestENINetConfigApply(base.TestCase):
self.temp_config_file = tempfile.NamedTemporaryFile()
self.ifup_interface_names = []
- def test_config_path():
+ def test_config_path(prefix):
return self.temp_config_file.name
self.stubs.Set(impl_eni, '_network_config_path', test_config_path)