Change in vdsm[master]: tests: Move network tests to its own folder
edwardh at redhat.com
edwardh at redhat.com
Thu Feb 18 14:08:23 UTC 2016
Edward Haas has uploaded a new change for review.
Change subject: tests: Move network tests to its own folder
......................................................................
tests: Move network tests to its own folder
Network tests (from tests/) have been moved to tests/network/ and their
filename have been updated to the following naming format: net_*_test.py
Change-Id: I35031fd50d0451c6321bdf8eee28127422bedafe
Signed-off-by: Edward Haas <edwardh at redhat.com>
---
M debian/vdsm-tests.install
M tests/Makefile.am
M tests/functional/networkTests.py
M tests/functional/networkTestsOVS.py
A tests/network/__init__.py
R tests/network/net_conf_persistence_test.py
R tests/network/net_conf_test.py
R tests/network/net_config_network_test.py
R tests/network/net_info_test.py
R tests/network/net_iproute2_test.py
R tests/network/net_ipwrapper_test.py
R tests/network/net_link_test.py
R tests/network/net_models_test.py
R tests/network/net_qos_test.py
R tests/network/net_tc_test.py
R tests/network/net_unified_persistence_test.py
R tests/network/netmaskconversions
R tests/network/nettestlib.py
R tests/network/tc_filter_show.out
M tests/samplingTests.py
M vdsm.spec.in
21 files changed, 50 insertions(+), 29 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/53704/1
diff --git a/debian/vdsm-tests.install b/debian/vdsm-tests.install
index 96518d4..5914d60 100644
--- a/debian/vdsm-tests.install
+++ b/debian/vdsm-tests.install
@@ -23,6 +23,6 @@
usr/share/vdsm/tests/glusterVolumeTasks.xml
usr/share/vdsm/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out
usr/share/vdsm/tests/mem_info.out
-usr/share/vdsm/tests/netmaskconversions
+usr/share/vdsm/tests/network/netmaskconversions
+usr/share/vdsm/tests/network/tc_filter_show.out
usr/share/vdsm/tests/run_tests.sh
-usr/share/vdsm/tests/tc_filter_show.out
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9d27564..e4e8356 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -54,7 +54,6 @@
cmdutilsTests.py \
commands_test.py \
concurrentTests.py \
- configNetworkTests.py \
cpuProfileTests.py \
deviceTests.py \
domainDescriptorTests.py \
@@ -72,8 +71,6 @@
hooksTests.py \
hostdevTests.py \
hoststatsTests.py \
- iproute2Tests.py \
- ipwrapperTests.py \
iscsiTests.py \
jobsTests.py \
libvirtconnectionTests.py \
@@ -87,12 +84,7 @@
momTests.py \
momPolicyTests.py \
mountTests.py \
- netUnifiedPersistenceTests.py \
- netconfpersistenceTests.py \
- netconfTests.py \
- netinfoTests.py \
- netlinkTests.py \
- netmodelsTests.py \
+ network/*_test.py \
numaUtilsTests.py \
outOfProcessTests.py \
parted_utils_tests.py \
@@ -103,7 +95,6 @@
protocoldetectorTests.py \
pthreadTests.py \
qemuimgTests.py \
- qosTests.py \
remoteFileHandlerTests.py \
resourceManagerTests.py \
responseTests.py \
@@ -126,7 +117,6 @@
storageMonitorTests.py \
storageServerTests.py \
tasksetTests.py \
- tcTests.py \
testlibTests.py \
toolTests.py \
toolBondingTests.py \
@@ -205,8 +195,8 @@
iscsiadm_-m_iface.out \
lvs_3386c6f2-926f-42c4-839c-38287fac8998.out \
mem_info.out \
- netmaskconversions \
- tc_filter_show.out \
+ network/netmaskconversions \
+ network/tc_filter_show.out \
toolTests_empty.conf \
toolTests_lconf_ssl.conf \
toolTests_libvirtd.conf \
@@ -224,7 +214,7 @@
fake-ssh-add \
fake-ssh-agent \
monkeypatch.py \
- nettestlib.py \
+ network/nettestlib.py \
storagefakelib.py \
storagetestlib.py \
testlib.py \
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 62f06b7..e03cb52 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -59,7 +59,7 @@
from testlib import (VdsmTestCase as TestCaseBase, namedTemporaryDir,
expandPermutations, permutations)
from testValidation import brokentest, slowtest, ValidateRunningAsRoot
-from nettestlib import Dummy, Tap, veth_pair
+from network.nettestlib import Dummy, Tap, veth_pair
import dhcp
import firewall
from utils import SUCCESS, getProxy
diff --git a/tests/functional/networkTestsOVS.py b/tests/functional/networkTestsOVS.py
index 3a003be..b1a34b6 100644
--- a/tests/functional/networkTestsOVS.py
+++ b/tests/functional/networkTestsOVS.py
@@ -24,7 +24,7 @@
from vdsm.utils import RollbackContext
from modprobe import RequireVethMod
-from nettestlib import veth_pair
+from network.nettestlib import veth_pair
from testlib import expandPermutations, permutations
import networkTests
diff --git a/tests/network/__init__.py b/tests/network/__init__.py
new file mode 100644
index 0000000..50dd68a
--- /dev/null
+++ b/tests/network/__init__.py
@@ -0,0 +1,20 @@
+#
+# Copyright 2013 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+from __future__ import absolute_import
diff --git a/tests/netconfpersistenceTests.py b/tests/network/net_conf_persistence_test.py
similarity index 100%
rename from tests/netconfpersistenceTests.py
rename to tests/network/net_conf_persistence_test.py
diff --git a/tests/netconfTests.py b/tests/network/net_conf_test.py
similarity index 100%
rename from tests/netconfTests.py
rename to tests/network/net_conf_test.py
diff --git a/tests/configNetworkTests.py b/tests/network/net_config_network_test.py
similarity index 98%
rename from tests/configNetworkTests.py
rename to tests/network/net_config_network_test.py
index 646efe2..4756516 100644
--- a/tests/configNetworkTests.py
+++ b/tests/network/net_config_network_test.py
@@ -20,6 +20,8 @@
# Refer to the README and COPYING files for full details of the license
#
+from __future__ import absolute_import
+
from vdsm import netinfo
from vdsm.netinfo import mtus
from vdsm.netinfo.mtus import DEFAULT_MTU
diff --git a/tests/netinfoTests.py b/tests/network/net_info_test.py
similarity index 98%
rename from tests/netinfoTests.py
rename to tests/network/net_info_test.py
index 72a0050..a1d19d1 100644
--- a/tests/netinfoTests.py
+++ b/tests/network/net_info_test.py
@@ -31,10 +31,10 @@
from vdsm.netlink import addr as nl_addr
from vdsm.utils import random_iface_name
-from ipwrapperTests import _fakeTypeDetection
+from .net_ipwrapper_test import _fakeTypeDetection
from modprobe import RequireBondingMod
from monkeypatch import MonkeyPatch, MonkeyPatchScope
-from nettestlib import dummy_device, veth_pair
+from .nettestlib import dummy_device, veth_pair
from testlib import VdsmTestCase as TestCaseBase, namedTemporaryDir
from testValidation import ValidateRunningAsRoot
from testValidation import brokentest
diff --git a/tests/iproute2Tests.py b/tests/network/net_iproute2_test.py
similarity index 94%
rename from tests/iproute2Tests.py
rename to tests/network/net_iproute2_test.py
index 4cdc393..ac839f4 100644
--- a/tests/iproute2Tests.py
+++ b/tests/network/net_iproute2_test.py
@@ -18,6 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
+from __future__ import absolute_import
from subprocess import Popen, PIPE
from testlib import VdsmTestCase as TestCaseBase
@@ -26,7 +27,7 @@
from vdsm.constants import EXT_BRCTL
from vdsm.network.configurators.iproute2 import _BRCTL_DEV_EXISTS
-from nettestlib import Bridge, requires_brctl
+from .nettestlib import Bridge, requires_brctl
class TestBridgeOverwrite(TestCaseBase):
diff --git a/tests/ipwrapperTests.py b/tests/network/net_ipwrapper_test.py
similarity index 97%
rename from tests/ipwrapperTests.py
rename to tests/network/net_ipwrapper_test.py
index 404295c..834a425 100644
--- a/tests/ipwrapperTests.py
+++ b/tests/network/net_ipwrapper_test.py
@@ -18,13 +18,16 @@
#
# Refer to the README and COPYING files for full details of the license
#
+
+from __future__ import absolute_import
+
from testValidation import ValidateRunningAsRoot
from vdsm import ipwrapper
from vdsm.ipwrapper import Route
from vdsm.ipwrapper import Rule
from vdsm.netlink import monitor
-from nettestlib import Bridge, requires_brctl
+from .nettestlib import Bridge, requires_brctl
from testlib import VdsmTestCase as TestCaseBase
diff --git a/tests/netlinkTests.py b/tests/network/net_link_test.py
similarity index 98%
rename from tests/netlinkTests.py
rename to tests/network/net_link_test.py
index 78dd70c..98c3cef 100644
--- a/tests/netlinkTests.py
+++ b/tests/network/net_link_test.py
@@ -4,7 +4,7 @@
import time
from functional.networkTests import IP_ADDRESS, IP_CIDR
-from nettestlib import Dummy
+from .nettestlib import Dummy
from vdsm.netlink import monitor
from vdsm.sysctl import is_disabled_ipv6
from vdsm.utils import monotonic_time
diff --git a/tests/netmodelsTests.py b/tests/network/net_models_test.py
similarity index 100%
rename from tests/netmodelsTests.py
rename to tests/network/net_models_test.py
diff --git a/tests/qosTests.py b/tests/network/net_qos_test.py
similarity index 97%
rename from tests/qosTests.py
rename to tests/network/net_qos_test.py
index 4f65080..11ac886 100644
--- a/tests/qosTests.py
+++ b/tests/network/net_qos_test.py
@@ -16,6 +16,9 @@
#
# Refer to the README and COPYING files for full details of the license
#
+
+from __future__ import absolute_import
+
from testlib import VdsmTestCase as TestCaseBase
from vdsm.netinfo import qos
diff --git a/tests/tcTests.py b/tests/network/net_tc_test.py
similarity index 98%
rename from tests/tcTests.py
rename to tests/network/net_tc_test.py
index bb68963..3b30b4f 100644
--- a/tests/tcTests.py
+++ b/tests/network/net_tc_test.py
@@ -18,6 +18,8 @@
#
# Refer to the README and COPYING files for full details of the license
#
+
+from __future__ import absolute_import
from collections import namedtuple
import time
import os
@@ -33,9 +35,9 @@
expandPermutations)
from testValidation import ValidateRunningAsRoot, stresstest
from monkeypatch import MonkeyClass
-from nettestlib import (Bridge, Dummy, IperfClient, IperfServer, Tap,
- bridge_device, network_namespace, requires_iperf3,
- requires_tc, requires_tun, veth_pair, vlan_device)
+from .nettestlib import (Bridge, Dummy, IperfClient, IperfServer, Tap,
+ bridge_device, network_namespace, requires_iperf3,
+ requires_tc, requires_tun, veth_pair, vlan_device)
from vdsm.constants import EXT_TC
from vdsm.network.configurators import qos
from vdsm.netinfo.qos import DEFAULT_CLASSID
diff --git a/tests/netUnifiedPersistenceTests.py b/tests/network/net_unified_persistence_test.py
similarity index 100%
rename from tests/netUnifiedPersistenceTests.py
rename to tests/network/net_unified_persistence_test.py
diff --git a/tests/netmaskconversions b/tests/network/netmaskconversions
similarity index 100%
rename from tests/netmaskconversions
rename to tests/network/netmaskconversions
diff --git a/tests/nettestlib.py b/tests/network/nettestlib.py
similarity index 100%
rename from tests/nettestlib.py
rename to tests/network/nettestlib.py
diff --git a/tests/tc_filter_show.out b/tests/network/tc_filter_show.out
similarity index 100%
rename from tests/tc_filter_show.out
rename to tests/network/tc_filter_show.out
diff --git a/tests/samplingTests.py b/tests/samplingTests.py
index 1aa3120..65c2d98 100644
--- a/tests/samplingTests.py
+++ b/tests/samplingTests.py
@@ -33,7 +33,7 @@
from testlib import permutations, expandPermutations
from testlib import VdsmTestCase as TestCaseBase
from monkeypatch import MonkeyPatchScope
-from nettestlib import dummy_device
+from network.nettestlib import dummy_device
@contextmanager
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 928485b..2446a80 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1225,9 +1225,9 @@
%{_datadir}/%{vdsm_name}/tests/iscsiadm_-m_iface.out
%{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out
%{_datadir}/%{vdsm_name}/tests/mem_info.out
-%{_datadir}/%{vdsm_name}/tests/netmaskconversions
+%{_datadir}/%{vdsm_name}/tests/network/netmaskconversions
+%{_datadir}/%{vdsm_name}/tests/network/tc_filter_show.out
%{_datadir}/%{vdsm_name}/tests/run_tests.sh
-%{_datadir}/%{vdsm_name}/tests/tc_filter_show.out
%{_datadir}/%{vdsm_name}/tests/toolTests_empty.conf
%{_datadir}/%{vdsm_name}/tests/toolTests_lconf_ssl.conf
%{_datadir}/%{vdsm_name}/tests/toolTests_libvirtd.conf
--
To view, visit https://gerrit.ovirt.org/53704
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I35031fd50d0451c6321bdf8eee28127422bedafe
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>
More information about the vdsm-patches
mailing list