diff options
Diffstat (limited to 'os_net_config/tests')
-rw-r--r-- | os_net_config/tests/test_cli.py | 9 | ||||
-rw-r--r-- | os_net_config/tests/test_impl_eni.py | 2 |
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) |