]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Check whether sudo is enabled in BaseSudoTestCase.setUpClass
authorCedric Brandily <zzelle@gmail.com>
Wed, 25 Feb 2015 17:13:10 +0000 (17:13 +0000)
committerCedric Brandily <zzelle@gmail.com>
Fri, 27 Feb 2015 22:16:00 +0000 (22:16 +0000)
commit1712e475745f03fbd9365a3042aeafac72e950c6
treea2dcb96a77b686301c0f08c7147f7e91a1f43bbb
parentd62993c135321d664f10202cbcc86b2212e274ce
Check whether sudo is enabled in BaseSudoTestCase.setUpClass

Currently functional test classes requiring invocation of commands via a
root helper inherit from BaseSudoTestCase[1] and should call explicitly
check_sudo_enabled in order to skip the test if sudo is disabled[2].

This change performs such check during BaseSudoTestCase.setUp in order
to ensure the check is done and replaces parent class for functional
test cases not requiring invocation of commands via a root helper.

This change prepares to transform BaseOVSLinuxTestCase[3] methods into
helper methods.

[1] in neutron.tests.functional.base
[2] sudo is enabled if OS_SUDO_TESTING is set to '1' or 'True'
[3] in neutron.tests.functional.agent.linux.base

Change-Id: I91a3506524352211729ac8b3b07cf3082fd8f13a
neutron/tests/functional/agent/linux/base.py
neutron/tests/functional/agent/linux/test_ip_lib.py
neutron/tests/functional/agent/linux/test_keepalived.py
neutron/tests/functional/agent/linux/test_ovsdb_monitor.py
neutron/tests/functional/agent/linux/test_process_monitor.py
neutron/tests/functional/agent/test_l3_agent.py
neutron/tests/functional/base.py
neutron/tests/functional/sanity/test_sanity.py