Set lock_path correctly.
[openstack-build/neutron-build.git] / neutron / tests / functional / sanity / test_sanity.py
1 # Copyright (c) 2014 OpenStack Foundation.
2 # All Rights Reserved.
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
5 #    not use this file except in compliance with the License. You may obtain
6 #    a copy of the License at
7 #
8 #         http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 #    License for the specific language governing permissions and limitations
14 #    under the License.
15
16 from neutron.cmd.sanity import checks
17 from neutron.tests import base
18 from neutron.tests.functional import base as functional_base
19
20
21 class SanityTestCase(base.BaseTestCase):
22     """Sanity checks that do not require root access.
23
24     Tests that just call checks.some_function() are to ensure that
25     neutron-sanity-check runs without throwing an exception, as in the case
26     where someone modifies the API without updating the check script.
27     """
28
29     def setUp(self):
30         super(SanityTestCase, self).setUp()
31
32     def test_nova_notify_runs(self):
33         checks.nova_notify_supported()
34
35     def test_dnsmasq_version(self):
36         checks.dnsmasq_version_supported()
37
38     def test_dibbler_version(self):
39         checks.dibbler_version_supported()
40
41     def test_ipset_support(self):
42         checks.ipset_supported()
43
44     def test_ip6tables_support(self):
45         checks.ip6tables_supported()
46
47
48 class SanityTestCaseRoot(functional_base.BaseSudoTestCase):
49     """Sanity checks that require root access.
50
51     Tests that just call checks.some_function() are to ensure that
52     neutron-sanity-check runs without throwing an exception, as in the case
53     where someone modifies the API without updating the check script.
54     """
55
56     def test_ovs_vxlan_support_runs(self):
57         checks.ovs_vxlan_supported()
58
59     def test_ovs_geneve_support_runs(self):
60         checks.ovs_geneve_supported()
61
62     def test_iproute2_vxlan_support_runs(self):
63         checks.iproute2_vxlan_supported()
64
65     def test_ovs_patch_support_runs(self):
66         checks.patch_supported()
67
68     def test_arp_responder_runs(self):
69         checks.arp_responder_supported()
70
71     def test_arp_header_match_runs(self):
72         checks.arp_header_match_supported()
73
74     def test_icmpv6_header_match_runs(self):
75         checks.icmpv6_header_match_supported()
76
77     def test_vf_management_runs(self):
78         checks.vf_management_supported()
79
80     def test_namespace_root_read_detection_runs(self):
81         checks.netns_read_requires_helper()
82
83     def test_ovsdb_native_supported_runs(self):
84         checks.ovsdb_native_supported()
85
86     def test_keepalived_ipv6_support(self):
87         checks.keepalived_ipv6_supported()