summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Belu <cbelu@cloudbasesolutions.com>2017-07-28 04:47:48 -0700
committerClaudiu Belu <cbelu@cloudbasesolutions.com>2017-07-31 02:46:46 -0700
commit4212a327ee4e1f42ed221ac0db32b01cd7b03f05 (patch)
treebc432180a223c8bab1cd4cd759a51832b6535e5f
parent763348b367d3707153267b005f07bdbcf83fb8f1 (diff)
Fixes flake8 and unittest errors
Notes
Notes (review): Code-Review+2: Claudiu Belu <cbelu@cloudbasesolutions.com> Workflow+1: Claudiu Belu <cbelu@cloudbasesolutions.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 31 Jul 2017 10:37:35 +0000 Reviewed-on: https://review.openstack.org/489130 Project: openstack/oswin-tempest-plugin Branch: refs/heads/master
-rw-r--r--oswin_tempest_plugin/config.py1
-rw-r--r--oswin_tempest_plugin/tests/scenario/test_cluster.py2
-rw-r--r--oswin_tempest_plugin/tests/scenario/test_disks.py2
-rw-r--r--oswin_tempest_plugin/tests/scenario/test_vnuma.py2
-rw-r--r--oswin_tempest_plugin/tests/test_base.py3
-rw-r--r--requirements.txt4
-rw-r--r--tox.ini6
7 files changed, 15 insertions, 5 deletions
diff --git a/oswin_tempest_plugin/config.py b/oswin_tempest_plugin/config.py
index e43e776..8870636 100644
--- a/oswin_tempest_plugin/config.py
+++ b/oswin_tempest_plugin/config.py
@@ -24,6 +24,7 @@ hyperv_group = cfg.OptGroup(name='hyperv',
24 24
25HyperVGroup = [ 25HyperVGroup = [
26 cfg.IntOpt('hypervisor_version', 26 cfg.IntOpt('hypervisor_version',
27 default=0,
27 help="Compute nodes' hypervisor version, used to determine " 28 help="Compute nodes' hypervisor version, used to determine "
28 "which tests to run. It must have following value: " 29 "which tests to run. It must have following value: "
29 "major_version * 1000 + minor_version" 30 "major_version * 1000 + minor_version"
diff --git a/oswin_tempest_plugin/tests/scenario/test_cluster.py b/oswin_tempest_plugin/tests/scenario/test_cluster.py
index 1d6e3aa..0a68963 100644
--- a/oswin_tempest_plugin/tests/scenario/test_cluster.py
+++ b/oswin_tempest_plugin/tests/scenario/test_cluster.py
@@ -21,9 +21,9 @@ from tempest.lib import exceptions as lib_exc
21from oswin_tempest_plugin.clients import wsman 21from oswin_tempest_plugin.clients import wsman
22from oswin_tempest_plugin import config 22from oswin_tempest_plugin import config
23from oswin_tempest_plugin import exceptions 23from oswin_tempest_plugin import exceptions
24from oswin_tempest_plugin.tests import test_base
25from oswin_tempest_plugin.tests._mixins import migrate 24from oswin_tempest_plugin.tests._mixins import migrate
26from oswin_tempest_plugin.tests._mixins import resize 25from oswin_tempest_plugin.tests._mixins import resize
26from oswin_tempest_plugin.tests import test_base
27 27
28CONF = config.CONF 28CONF = config.CONF
29LOG = logging.getLogger(__name__) 29LOG = logging.getLogger(__name__)
diff --git a/oswin_tempest_plugin/tests/scenario/test_disks.py b/oswin_tempest_plugin/tests/scenario/test_disks.py
index 9a06a3e..c27728a 100644
--- a/oswin_tempest_plugin/tests/scenario/test_disks.py
+++ b/oswin_tempest_plugin/tests/scenario/test_disks.py
@@ -14,9 +14,9 @@
14# under the License. 14# under the License.
15 15
16from oswin_tempest_plugin import config 16from oswin_tempest_plugin import config
17from oswin_tempest_plugin.tests import test_base
18from oswin_tempest_plugin.tests._mixins import migrate 17from oswin_tempest_plugin.tests._mixins import migrate
19from oswin_tempest_plugin.tests._mixins import resize 18from oswin_tempest_plugin.tests._mixins import resize
19from oswin_tempest_plugin.tests import test_base
20 20
21CONF = config.CONF 21CONF = config.CONF
22 22
diff --git a/oswin_tempest_plugin/tests/scenario/test_vnuma.py b/oswin_tempest_plugin/tests/scenario/test_vnuma.py
index 3fa1977..2b95294 100644
--- a/oswin_tempest_plugin/tests/scenario/test_vnuma.py
+++ b/oswin_tempest_plugin/tests/scenario/test_vnuma.py
@@ -13,10 +13,10 @@
13# License for the specific language governing permissions and limitations 13# License for the specific language governing permissions and limitations
14# under the License. 14# under the License.
15 15
16from oswin_tempest_plugin.tests import test_base
17from oswin_tempest_plugin.tests._mixins import migrate 16from oswin_tempest_plugin.tests._mixins import migrate
18from oswin_tempest_plugin.tests._mixins import optional_feature 17from oswin_tempest_plugin.tests._mixins import optional_feature
19from oswin_tempest_plugin.tests._mixins import resize 18from oswin_tempest_plugin.tests._mixins import resize
19from oswin_tempest_plugin.tests import test_base
20 20
21 21
22class HyperVvNumaTestCase(test_base.TestBase, 22class HyperVvNumaTestCase(test_base.TestBase,
diff --git a/oswin_tempest_plugin/tests/test_base.py b/oswin_tempest_plugin/tests/test_base.py
index 994fb28..c99dd9e 100644
--- a/oswin_tempest_plugin/tests/test_base.py
+++ b/oswin_tempest_plugin/tests/test_base.py
@@ -21,6 +21,7 @@ from tempest.common.utils.linux import remote_client
21from tempest.common import waiters 21from tempest.common import waiters
22from tempest.lib.common.utils import data_utils 22from tempest.lib.common.utils import data_utils
23from tempest.lib.common.utils import test_utils 23from tempest.lib.common.utils import test_utils
24from tempest.lib import exceptions
24import tempest.test 25import tempest.test
25 26
26from oswin_tempest_plugin import config 27from oswin_tempest_plugin import config
@@ -219,7 +220,7 @@ class TestBase(tempest.test.BaseTestCase):
219 for ruleset in rulesets: 220 for ruleset in rulesets:
220 for r_direction in ['ingress', 'egress']: 221 for r_direction in ['ingress', 'egress']:
221 ruleset['direction'] = r_direction 222 ruleset['direction'] = r_direction
222 sg_rule = self._create_security_group_rule( 223 self._create_security_group_rule(
223 secgroup, **ruleset) 224 secgroup, **ruleset)
224 225
225 def _create_security_group_rule(self, secgroup, **kwargs): 226 def _create_security_group_rule(self, secgroup, **kwargs):
diff --git a/requirements.txt b/requirements.txt
index 450deb6..8e24361 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,4 +3,8 @@
3# process, which may cause wedges in the gate later. 3# process, which may cause wedges in the gate later.
4 4
5pbr>=2.0 # Apache-2.0 5pbr>=2.0 # Apache-2.0
6
7oslo.config>=4.0.0,!=4.3.0,!=4.4.0 # Apache-2.0
8oslo.log>=3.22.0 # Apache-2.0
9tempest>=16.1.0 # Apache-2.0
6pywinrm>=0.2.2 # MIT 10pywinrm>=0.2.2 # MIT
diff --git a/tox.ini b/tox.ini
index 338770f..bd1d8b0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,8 +8,12 @@ usedevelop = True
8install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} 8install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9setenv = 9setenv =
10 VIRTUAL_ENV={envdir} 10 VIRTUAL_ENV={envdir}
11 BRANCH_NAME=master
12 CLIENT_NAME=oswin-tempest-plugin
11 PYTHONWARNINGS=default::DeprecationWarning 13 PYTHONWARNINGS=default::DeprecationWarning
12deps = -r{toxinidir}/test-requirements.txt 14deps = -r{toxinidir}/requirements.txt
15 -r{toxinidir}/test-requirements.txt
16
13commands = python setup.py test --slowest --testr-args='{posargs}' 17commands = python setup.py test --slowest --testr-args='{posargs}'
14 18
15[testenv:pep8] 19[testenv:pep8]