Browse Source

Fixes flake8 and unittest errors

Change-Id: I4398a098da08ed8e086edac86fe8d68a06cf8eda
Claudiu Belu 1 year ago
parent
commit
4212a327ee

+ 1
- 0
oswin_tempest_plugin/config.py View File

@@ -24,6 +24,7 @@ hyperv_group = cfg.OptGroup(name='hyperv',
24 24
 
25 25
 HyperVGroup = [
26 26
     cfg.IntOpt('hypervisor_version',
27
+               default=0,
27 28
                help="Compute nodes' hypervisor version, used to determine "
28 29
                     "which tests to run. It must have following value: "
29 30
                     "major_version * 1000 + minor_version"

+ 1
- 1
oswin_tempest_plugin/tests/scenario/test_cluster.py View File

@@ -21,9 +21,9 @@ from tempest.lib import exceptions as lib_exc
21 21
 from oswin_tempest_plugin.clients import wsman
22 22
 from oswin_tempest_plugin import config
23 23
 from oswin_tempest_plugin import exceptions
24
-from oswin_tempest_plugin.tests import test_base
25 24
 from oswin_tempest_plugin.tests._mixins import migrate
26 25
 from oswin_tempest_plugin.tests._mixins import resize
26
+from oswin_tempest_plugin.tests import test_base
27 27
 
28 28
 CONF = config.CONF
29 29
 LOG = logging.getLogger(__name__)

+ 1
- 1
oswin_tempest_plugin/tests/scenario/test_disks.py View File

@@ -14,9 +14,9 @@
14 14
 #    under the License.
15 15
 
16 16
 from oswin_tempest_plugin import config
17
-from oswin_tempest_plugin.tests import test_base
18 17
 from oswin_tempest_plugin.tests._mixins import migrate
19 18
 from oswin_tempest_plugin.tests._mixins import resize
19
+from oswin_tempest_plugin.tests import test_base
20 20
 
21 21
 CONF = config.CONF
22 22
 

+ 1
- 1
oswin_tempest_plugin/tests/scenario/test_vnuma.py View File

@@ -13,10 +13,10 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
-from oswin_tempest_plugin.tests import test_base
17 16
 from oswin_tempest_plugin.tests._mixins import migrate
18 17
 from oswin_tempest_plugin.tests._mixins import optional_feature
19 18
 from oswin_tempest_plugin.tests._mixins import resize
19
+from oswin_tempest_plugin.tests import test_base
20 20
 
21 21
 
22 22
 class HyperVvNumaTestCase(test_base.TestBase,

+ 2
- 1
oswin_tempest_plugin/tests/test_base.py View File

@@ -21,6 +21,7 @@ from tempest.common.utils.linux import remote_client
21 21
 from tempest.common import waiters
22 22
 from tempest.lib.common.utils import data_utils
23 23
 from tempest.lib.common.utils import test_utils
24
+from tempest.lib import exceptions
24 25
 import tempest.test
25 26
 
26 27
 from oswin_tempest_plugin import config
@@ -219,7 +220,7 @@ class TestBase(tempest.test.BaseTestCase):
219 220
         for ruleset in rulesets:
220 221
             for r_direction in ['ingress', 'egress']:
221 222
                 ruleset['direction'] = r_direction
222
-                sg_rule = self._create_security_group_rule(
223
+                self._create_security_group_rule(
223 224
                     secgroup, **ruleset)
224 225
 
225 226
     def _create_security_group_rule(self, secgroup, **kwargs):

+ 4
- 0
requirements.txt View File

@@ -3,4 +3,8 @@
3 3
 # process, which may cause wedges in the gate later.
4 4
 
5 5
 pbr>=2.0 # Apache-2.0
6
+
7
+oslo.config>=4.0.0,!=4.3.0,!=4.4.0 # Apache-2.0
8
+oslo.log>=3.22.0 # Apache-2.0
9
+tempest>=16.1.0 # Apache-2.0
6 10
 pywinrm>=0.2.2 # MIT

+ 5
- 1
tox.ini View File

@@ -8,8 +8,12 @@ usedevelop = True
8 8
 install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9 9
 setenv =
10 10
    VIRTUAL_ENV={envdir}
11
+   BRANCH_NAME=master
12
+   CLIENT_NAME=oswin-tempest-plugin
11 13
    PYTHONWARNINGS=default::DeprecationWarning
12
-deps = -r{toxinidir}/test-requirements.txt
14
+deps = -r{toxinidir}/requirements.txt
15
+       -r{toxinidir}/test-requirements.txt
16
+
13 17
 commands = python setup.py test --slowest --testr-args='{posargs}'
14 18
 
15 19
 [testenv:pep8]

Loading…
Cancel
Save