~niedbalski/ubuntu/vivid/neutron/fixes-1447803

« back to all changes in this revision

Viewing changes to neutron/tests/unit/test_linux_ip_lib.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-10-03 18:45:23 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20141003184523-4mt6dy1q3j8n30c9
Tags: 1:2014.2~rc1-0ubuntu1
* New upstream release candidate:
  - d/p/*: Refreshed.
  - d/control: Add python-requests-mock to BD's.
  - d/control: Align versioned requirements with upstream.
* Transition linuxbridge and openvswitch plugin users to modular
  layer 2 plugin (LP: #1323729):
  - d/control: Mark removed plugin packages as transitional, depend
    on neutron-plugin-ml2, mark oldlibs/extra.
  - d/neutron-plugin-{linuxbridge,openvswitch}.install: Drop.
  - d/control: Depend on neutron-plugin-ml2 for linuxbridge
    agent package.
  - d/neutron-plugin-linuxbridge-agent.upstart: Use ml2 plugin
    configuration files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
792
792
            execute.assert_called_once_with(
793
793
                ['ip', 'netns', 'exec', 'ns',
794
794
                 'sysctl', '-w', 'net.ipv4.conf.all.promote_secondaries=1'],
795
 
                root_helper='sudo', check_exit_code=True)
 
795
                root_helper='sudo', check_exit_code=True, extra_ok_codes=None)
796
796
 
797
797
    def test_delete_namespace(self):
798
798
        with mock.patch('neutron.agent.linux.utils.execute'):
830
830
            execute.assert_called_once_with(['ip', 'netns', 'exec', 'ns', 'ip',
831
831
                                             'link', 'list'],
832
832
                                            root_helper='sudo',
833
 
                                            check_exit_code=True)
 
833
                                            check_exit_code=True,
 
834
                                            extra_ok_codes=None)
834
835
 
835
836
    def test_execute_env_var_prepend(self):
836
837
        self.parent.namespace = 'ns'
841
842
                ['ip', 'netns', 'exec', 'ns', 'env'] +
842
843
                ['%s=%s' % (k, v) for k, v in env.items()] +
843
844
                ['ip', 'link', 'list'],
844
 
                root_helper='sudo', check_exit_code=True)
 
845
                root_helper='sudo', check_exit_code=True, extra_ok_codes=None)
845
846
 
846
847
    def test_execute_nosudo_with_no_namespace(self):
847
848
        with mock.patch('neutron.agent.linux.utils.execute') as execute:
850
851
            self.netns_cmd.execute(['test'])
851
852
            execute.assert_called_once_with(['test'],
852
853
                                            root_helper=None,
853
 
                                            check_exit_code=True)
 
854
                                            check_exit_code=True,
 
855
                                            extra_ok_codes=None)
854
856
 
855
857
 
856
858
class TestDeviceExists(base.BaseTestCase):