summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Dulko <mdulko@redhat.com>2017-12-07 13:42:55 +0100
committerMichał Dulko <mdulko@redhat.com>2017-12-07 13:42:55 +0100
commitffbd59d79213fc66d91e0fb17fe76c7841d84026 (patch)
treeba777e1f651c5cae544bc6ddae8307420f10b755
parentb9cabcdbc886b403cd6c74b327cad0b8ad422554 (diff)
Fix pep8 tox job
pep8 was configured incorrectly in tox.ini and wasn't catching violations. This commit fixes the job and the issues that got in while the job was silently ignoring them. Change-Id: Id4d1e3192c558edf3c4babae54c87c1ba10d617f
Notes
Notes (review): Code-Review+2: Daniel Mellado <dmellado@redhat.com> Workflow+1: Daniel Mellado <dmellado@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 11 Dec 2017 14:19:03 +0000 Reviewed-on: https://review.openstack.org/526358 Project: openstack/kuryr-tempest-plugin Branch: refs/heads/master
-rw-r--r--kuryr_tempest_plugin/tests/base.py2
-rw-r--r--kuryr_tempest_plugin/tests/scenario/base.py8
-rw-r--r--kuryr_tempest_plugin/tests/scenario/test_cross_ping.py5
-rw-r--r--kuryr_tempest_plugin/tests/test_pods.py2
-rw-r--r--tox.ini1
5 files changed, 8 insertions, 10 deletions
diff --git a/kuryr_tempest_plugin/tests/base.py b/kuryr_tempest_plugin/tests/base.py
index 05e5564..3eb68b1 100644
--- a/kuryr_tempest_plugin/tests/base.py
+++ b/kuryr_tempest_plugin/tests/base.py
@@ -31,6 +31,6 @@ class BaseAdminKuryrTest(base.BaseAdminNetworkTest):
31 @classmethod 31 @classmethod
32 def resource_setup(cls): 32 def resource_setup(cls):
33 super(BaseAdminKuryrTest, cls).resource_setup() 33 super(BaseAdminKuryrTest, cls).resource_setup()
34 # TODO (dmellado): Config k8s client in a cleaner way 34 # TODO(dmellado): Config k8s client in a cleaner way
35 kubernetes.config.load_kube_config() 35 kubernetes.config.load_kube_config()
36 cls.k8s_client = kubernetes.client.CoreV1Api() 36 cls.k8s_client = kubernetes.client.CoreV1Api()
diff --git a/kuryr_tempest_plugin/tests/scenario/base.py b/kuryr_tempest_plugin/tests/scenario/base.py
index eb3bc19..290e0bd 100644
--- a/kuryr_tempest_plugin/tests/scenario/base.py
+++ b/kuryr_tempest_plugin/tests/scenario/base.py
@@ -17,9 +17,9 @@ import time
17from kubernetes import client as k8s_client 17from kubernetes import client as k8s_client
18from kubernetes import config as k8s_config 18from kubernetes import config as k8s_config
19 19
20from tempest.scenario import manager
21from tempest.lib.common.utils import data_utils
22from tempest import config 20from tempest import config
21from tempest.lib.common.utils import data_utils
22from tempest.scenario import manager
23 23
24CONF = config.CONF 24CONF = config.CONF
25 25
@@ -41,7 +41,7 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest):
41 def resource_setup(cls): 41 def resource_setup(cls):
42 super(BaseKuryrScenarioTest, cls).resource_setup() 42 super(BaseKuryrScenarioTest, cls).resource_setup()
43 cls.pod_fips = [] 43 cls.pod_fips = []
44 # TODO (dmellado): Config k8s client in a cleaner way 44 # TODO(dmellado): Config k8s client in a cleaner way
45 k8s_config.load_kube_config() 45 k8s_config.load_kube_config()
46 46
47 @classmethod 47 @classmethod
@@ -68,7 +68,7 @@ class BaseKuryrScenarioTest(manager.NetworkScenarioTest):
68 body=pod) 68 body=pod)
69 status = "" 69 status = ""
70 while status != "Running": 70 while status != "Running":
71 # TODO (dmellado) add timeout config to tempest plugin 71 # TODO(dmellado) add timeout config to tempest plugin
72 time.sleep(1) 72 time.sleep(1)
73 status = self.get_pod_status(name, namespace) 73 status = self.get_pod_status(name, namespace)
74 74
diff --git a/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py b/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py
index 5687df2..6d11fea 100644
--- a/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py
+++ b/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py
@@ -12,13 +12,11 @@
12# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
13# limitations under the License. 13# limitations under the License.
14 14
15import testtools
16
17from oslo_log import log as logging 15from oslo_log import log as logging
18from tempest import config 16from tempest import config
17from tempest.lib.common.utils import data_utils
19from tempest.lib import decorators 18from tempest.lib import decorators
20from tempest.lib import exceptions 19from tempest.lib import exceptions
21from tempest.lib.common.utils import data_utils
22 20
23from kuryr_tempest_plugin.tests.scenario import base 21from kuryr_tempest_plugin.tests.scenario import base
24 22
@@ -61,6 +59,7 @@ class TestCrossPingScenario(base.BaseKuryrScenarioTest):
61 'from host "%s" to "%s".' % ( 59 'from host "%s" to "%s".' % (
62 fip['floating_ip_address'], 60 fip['floating_ip_address'],
63 pod_fip['floatingip']['floating_ip_address'])) 61 pod_fip['floatingip']['floating_ip_address']))
62 LOG.error(msg)
64 self.assertEqual('0', result.rstrip('\n')) 63 self.assertEqual('0', result.rstrip('\n'))
65 except exceptions.SSHExecCommandFailed: 64 except exceptions.SSHExecCommandFailed:
66 LOG.error("Couldn't ping server") 65 LOG.error("Couldn't ping server")
diff --git a/kuryr_tempest_plugin/tests/test_pods.py b/kuryr_tempest_plugin/tests/test_pods.py
index c79faf4..359cb2c 100644
--- a/kuryr_tempest_plugin/tests/test_pods.py
+++ b/kuryr_tempest_plugin/tests/test_pods.py
@@ -14,8 +14,8 @@
14 14
15 15
16from oslo_log import log as logging 16from oslo_log import log as logging
17from tempest.lib import decorators
18from tempest.lib.common.utils import data_utils 17from tempest.lib.common.utils import data_utils
18from tempest.lib import decorators
19 19
20from kuryr_tempest_plugin.tests import base 20from kuryr_tempest_plugin.tests import base
21 21
diff --git a/tox.ini b/tox.ini
index df30326..3ab007a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -29,4 +29,3 @@ commands =
29show-source = true 29show-source = true
30builtins = _ 30builtins = _
31exclude=.venv,.git,.tox,dist,*lib/python*,*egg,tools,doc 31exclude=.venv,.git,.tox,dist,*lib/python*,*egg,tools,doc
32select = E