aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/tests/test_cli.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2014-09-18 15:47:04 -0400
committerDan Prince <dprince@redhat.com>2014-09-18 15:52:49 -0400
commitf457c64bae1e4cca63cd616bfe5e231850838f70 (patch)
tree0016c6bccfae8a9c5915e0cf004cbcb9126d1408 /os_net_config/tests/test_cli.py
parent7b968a875d08d70996e12c69a6a8856b0635c462 (diff)
Update child_members to use a Set
Updates the impl_ifcfg.child_members method so that it uses a set instead of an array (this avoids dups). Also fixes an issue with this method which would cause tests to fail intermittently due to ordering differences. Adding each member object regardless solves this (not sure why I had commented out the children.append before) Also fixes an issue in test_cli which causes tests to fail on Debian which doesn't yet support the add_bond method on its ENI provider. This fix was to explicitly set --provider=ifcfg on the failing tests. We should be able to remove these once ENI supports bonding properly. Closes-bug: #1370615 Change-Id: Id9cfa2b2eaab27c93113956f5956facfa2a2aeee
Diffstat (limited to 'os_net_config/tests/test_cli.py')
-rw-r--r--os_net_config/tests/test_cli.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/os_net_config/tests/test_cli.py b/os_net_config/tests/test_cli.py
index 505301c..6c13068 100644
--- a/os_net_config/tests/test_cli.py
+++ b/os_net_config/tests/test_cli.py
@@ -49,8 +49,10 @@ class TestCli(base.TestCase):
def test_bond_noop_output(self):
bond_yaml = os.path.join(SAMPLE_BASE, 'bond.yaml')
bond_json = os.path.join(SAMPLE_BASE, 'bond.json')
- stdout_yaml, stderr = self.run_cli('ARG0 -d --noop -c %s' % bond_yaml)
- stdout_json, stderr = self.run_cli('ARG0 -d --noop -c %s' % bond_json)
+ stdout_yaml, stderr = self.run_cli('ARG0 -d --provider=ifcfg --noop '
+ '-c %s' % bond_yaml)
+ stdout_json, stderr = self.run_cli('ARG0 -d --provider=ifcfg --noop '
+ '-c %s' % bond_json)
self.assertEqual(stdout_yaml, stdout_json)
def test_bridge_noop_output(self):