diff --git a/os_vif/tests/functional/privsep.py b/os_vif/tests/functional/privsep.py index 115bb139..91f1f685 100644 --- a/os_vif/tests/functional/privsep.py +++ b/os_vif/tests/functional/privsep.py @@ -17,5 +17,5 @@ os_vif_pctxt = priv_context.PrivContext( 'os_vif', cfg_section='os_vif_privileged', pypath=__name__ + '.os_vif_pctxt', - capabilities=[c.CAP_NET_ADMIN], + capabilities=[c.CAP_NET_ADMIN, c.CAP_DAC_OVERRIDE], ) diff --git a/tox.ini b/tox.ini index 940241aa..e7b402cd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,8 @@ [tox] minversion = 3.18.0 envlist = py3,pep8,docs,releasenotes,cover -skipsdist = True -ignore_basepython_conflict = True [testenv] -basepython = python3 usedevelop = True setenv = deps = @@ -88,5 +85,7 @@ import_exceptions = os_vif.i18n # system dependencies are missing, since it's used to tell you what system # dependencies are missing! This also means that bindep must be installed # separately, outside of the requirements files. +skipsdist=True +usedevelop=False deps = bindep commands = bindep test diff --git a/vif_plug_ovs/privsep.py b/vif_plug_ovs/privsep.py index dc4438bc..9c6bf142 100644 --- a/vif_plug_ovs/privsep.py +++ b/vif_plug_ovs/privsep.py @@ -20,5 +20,16 @@ vif_plug = priv_context.PrivContext( "vif_plug_ovs", cfg_section="vif_plug_ovs_privileged", pypath=__name__ + ".vif_plug", - capabilities=[c.CAP_NET_ADMIN], + capabilities=[ + c.CAP_NET_ADMIN, + ], +) + +vif_plug_test = priv_context.PrivContext( + "vif_plug_ovs", + cfg_section="vif_plug_ovs_privileged", + pypath=__name__ + ".vif_plug_test", + capabilities=[ + c.CAP_NET_ADMIN, c.CAP_DAC_OVERRIDE, + ], ) diff --git a/vif_plug_ovs/tests/functional/ovsdb/test_ovsdb_lib.py b/vif_plug_ovs/tests/functional/ovsdb/test_ovsdb_lib.py index 444af7e5..64b6d8c8 100644 --- a/vif_plug_ovs/tests/functional/ovsdb/test_ovsdb_lib.py +++ b/vif_plug_ovs/tests/functional/ovsdb/test_ovsdb_lib.py @@ -32,7 +32,7 @@ from vif_plug_ovs.tests.functional import base CONF = cfg.CONF -@privsep.vif_plug.entrypoint +@privsep.vif_plug_test.entrypoint def run_privileged(*full_args): return processutils.execute(*full_args)[0].rstrip()