Bump hacking
hacking 3.0.x is too old. Bump it to the version currently used in tempest repo. Depends-on: https://review.opendev.org/c/openstack/tempest/+/906634 Change-Id: I01f9496e0fb66397916f8f8ce7543e3786f5d1dc
This commit is contained in:
parent
20e6666c81
commit
435ff6ffc5
@ -386,7 +386,7 @@ class BaseSecGroupRulesQuota(base.BaseAdminNetworkTest):
|
||||
self.admin_client.update_quotas(project_id,
|
||||
**{'security_group_rule': val,
|
||||
'force': True})
|
||||
LOG.info('Trying to update security group rule quota {} '.format(val))
|
||||
LOG.info('Trying to update security group rule quota %r', val)
|
||||
|
||||
def _get_sg_rules_quota(self):
|
||||
project_id = self.client.project_id
|
||||
|
@ -194,29 +194,29 @@ class StatefulConnection:
|
||||
sleep=self.test_sleep)
|
||||
try:
|
||||
LOG.info("Checking connectivity between server and client -"
|
||||
" attempt {}".format(self.test_attempt))
|
||||
" attempt %d", self.test_attempt)
|
||||
self.server_ssh.exec_command(
|
||||
'grep {} output.txt'.format(self.test_str))
|
||||
self.client_ssh.exec_command(
|
||||
'grep {} output.txt'.format(self.test_str))
|
||||
if not self.should_pass:
|
||||
LOG.warning("attempt {} succeed while it should fail".format(
|
||||
self.test_attempt))
|
||||
LOG.warning("attempt %d succeed while it should fail",
|
||||
self.test_attempt)
|
||||
return False
|
||||
else:
|
||||
if not self.connection_started:
|
||||
self.connection_started = True
|
||||
LOG.info("attempt {} succeed as it expected".format(
|
||||
self.test_attempt))
|
||||
LOG.info("attempt %d succeed as it expected",
|
||||
self.test_attempt)
|
||||
return True
|
||||
except exceptions.SSHExecCommandFailed:
|
||||
if self.should_pass:
|
||||
LOG.warning("attempt {} failed while it should pass".format(
|
||||
self.test_attempt))
|
||||
LOG.warning("attempt %d failed while it should pass",
|
||||
self.test_attempt)
|
||||
return False
|
||||
else:
|
||||
LOG.info("attempt {} failed as it expected".format(
|
||||
self.test_attempt))
|
||||
LOG.info("attempt %d failed as it expected",
|
||||
self.test_attempt)
|
||||
return True
|
||||
finally:
|
||||
self.test_attempt += 1
|
||||
|
@ -89,9 +89,9 @@ class TestFWaaS_v2(base.FWaaSScenarioTest_V2):
|
||||
(ssh_source, remote_ip, should_connect),
|
||||
msg)
|
||||
except Exception:
|
||||
LOG.exception("Unable to access {dest} via ssh to "
|
||||
"floating-ip {src}".format(dest=remote_ip,
|
||||
src=floating_ip))
|
||||
LOG.exception("Unable to access %s via ssh to "
|
||||
"floating-ip %s",
|
||||
remote_ip, floating_ip)
|
||||
raise
|
||||
|
||||
def _check_remote_connectivity(self, source, dest, should_succeed=True,
|
||||
|
@ -177,7 +177,7 @@ class BgpSpeakerTestJSON(BgpSpeakerTestJSONBase):
|
||||
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
|
||||
bgp_peers_list = bgp_speaker['peers']
|
||||
self.assertEqual(1, len(bgp_peers_list))
|
||||
self.assertTrue(bgp_peer_id in bgp_peers_list)
|
||||
self.assertIn(bgp_peer_id, bgp_peers_list)
|
||||
|
||||
@decorators.idempotent_id('f9737708-1d79-440b-8350-779f97d882ee')
|
||||
def test_remove_bgp_peer(self):
|
||||
@ -188,7 +188,7 @@ class BgpSpeakerTestJSON(BgpSpeakerTestJSONBase):
|
||||
self.add_bgp_peer(bgp_speaker_id, bgp_peer_id)
|
||||
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
|
||||
bgp_peers_list = bgp_speaker['peers']
|
||||
self.assertTrue(bgp_peer_id in bgp_peers_list)
|
||||
self.assertIn(bgp_peer_id, bgp_peers_list)
|
||||
|
||||
bgp_speaker = self.remove_bgp_peer(bgp_speaker_id, bgp_peer_id)
|
||||
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
|
||||
@ -206,7 +206,7 @@ class BgpSpeakerTestJSON(BgpSpeakerTestJSONBase):
|
||||
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
|
||||
network_list = bgp_speaker['networks']
|
||||
self.assertEqual(1, len(network_list))
|
||||
self.assertTrue(self.ext_net_id in network_list)
|
||||
self.assertIn(self.ext_net_id, network_list)
|
||||
|
||||
@decorators.idempotent_id('6cfc7137-0d99-4a3d-826c-9d1a3a1767b0')
|
||||
def test_remove_gateway_network(self):
|
||||
@ -218,7 +218,7 @@ class BgpSpeakerTestJSON(BgpSpeakerTestJSONBase):
|
||||
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
|
||||
networks = bgp_speaker['networks']
|
||||
|
||||
self.assertTrue(self.ext_net_id in networks)
|
||||
self.assertIn(self.ext_net_id, networks)
|
||||
self.bgp_adm_client.remove_bgp_gateway_network(bgp_speaker_id,
|
||||
self.ext_net_id)
|
||||
bgp_speaker = self.get_bgp_speaker(bgp_speaker_id)
|
||||
|
@ -227,37 +227,37 @@ class NetworkWritableMtuTest(NetworkMtuBaseTest):
|
||||
@decorators.idempotent_id('bc470200-d8f4-4f07-b294-1b4cbaaa35b9')
|
||||
def test_connectivity_min_max_mtu(self):
|
||||
server_ssh_client, _, _, fip2 = self._create_setup()
|
||||
log_msg = ("Ping with {mtu_size} MTU of 2 networks. Fragmentation is "
|
||||
"{fragmentation_state}. Expected result: ping "
|
||||
"{ping_status}")
|
||||
log_msg = ("Ping with %(mtu_size)s MTU of 2 networks. "
|
||||
"Fragmentation is %(fragmentation_state)s. "
|
||||
"Expected result: ping %(ping_status)s")
|
||||
|
||||
# ping with min mtu of 2 networks succeeds even when
|
||||
# fragmentation is disabled
|
||||
LOG.debug(log_msg.format(mtu_size='minimal',
|
||||
fragmentation_state='disabled', ping_status='succeeded'))
|
||||
LOG.debug(log_msg, mtu_size='minimal',
|
||||
fragmentation_state='disabled', ping_status='succeeded')
|
||||
self.check_remote_connectivity(
|
||||
server_ssh_client, fip2['fixed_ip_address'],
|
||||
mtu=self.networks[0]['mtu'], fragmentation=False)
|
||||
|
||||
# ping with the size above min mtu of 2 networks
|
||||
# fails when fragmentation is disabled
|
||||
LOG.debug(log_msg.format(mtu_size='size above minimal',
|
||||
fragmentation_state='disabled', ping_status='failed'))
|
||||
LOG.debug(log_msg, mtu_size='size above minimal',
|
||||
fragmentation_state='disabled', ping_status='failed')
|
||||
self.check_remote_connectivity(
|
||||
server_ssh_client, fip2['fixed_ip_address'], should_succeed=False,
|
||||
mtu=self.networks[0]['mtu'] + 2, fragmentation=False)
|
||||
|
||||
# ping with max mtu of 2 networks succeeds when
|
||||
# fragmentation is enabled
|
||||
LOG.debug(log_msg.format(mtu_size='maximal',
|
||||
fragmentation_state='enabled', ping_status='succeeded'))
|
||||
LOG.debug(log_msg, mtu_size='maximal',
|
||||
fragmentation_state='enabled', ping_status='succeeded')
|
||||
self.check_remote_connectivity(
|
||||
server_ssh_client, fip2['fixed_ip_address'],
|
||||
mtu=self.networks[1]['mtu'])
|
||||
|
||||
# ping with max mtu of 2 networks fails when fragmentation is disabled
|
||||
LOG.debug(log_msg.format(mtu_size='maximal',
|
||||
fragmentation_state='disabled', ping_status='failed'))
|
||||
LOG.debug(log_msg, mtu_size='maximal',
|
||||
fragmentation_state='disabled', ping_status='failed')
|
||||
self.check_remote_connectivity(
|
||||
server_ssh_client, fip2['fixed_ip_address'], should_succeed=False,
|
||||
mtu=self.networks[1]['mtu'], fragmentation=False)
|
||||
|
@ -107,8 +107,8 @@ class PortsTest(base.BaseTempestTestCase):
|
||||
if port is not None:
|
||||
break
|
||||
except Exception as e:
|
||||
LOG.warning('Failed to create Port, using Fixed_IP:{}, '
|
||||
'the Error was:{}'.format(ip, e))
|
||||
LOG.warning('Failed to create Port, using Fixed_IP:%s, '
|
||||
'the Error was:%s', ip, e)
|
||||
fip, server = self._create_instance_with_port(port)
|
||||
self.check_connectivity(fip[0]['floating_ip_address'],
|
||||
CONF.validation.image_ssh_user,
|
||||
|
@ -14,16 +14,15 @@
|
||||
# under the License.
|
||||
|
||||
from contextlib import contextmanager
|
||||
from oslo_log import log
|
||||
import testtools
|
||||
|
||||
from oslo_log import log
|
||||
from tempest.common import utils
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.lib.common.utils.linux import remote_client
|
||||
from tempest.lib.common.utils import test_utils
|
||||
|
||||
from tempest.lib import decorators
|
||||
import testtools
|
||||
|
||||
from neutron_tempest_plugin.tap_as_a_service.scenario import manager
|
||||
|
||||
@ -151,7 +150,7 @@ class TestTaaSTrafficScenarios(manager.BaseTaasScenarioTests):
|
||||
|
||||
# Ensure tcpdump is up and running
|
||||
psax = self.monitor_client.exec_command("ps -ax")
|
||||
self.assertTrue("tcpdump" in psax)
|
||||
self.assertIn("tcpdump", psax)
|
||||
|
||||
# Run traffic from left_vm to right_vm
|
||||
LOG.debug('Check ICMP traffic: ping %s ', right_ip)
|
||||
|
@ -1,7 +1,7 @@
|
||||
hacking>=3.2.0,<3.3.0 # Apache-2.0
|
||||
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
||||
|
||||
coverage>=4.4.1 # Apache-2.0
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
flake8-import-order>=0.18.0,<0.19.0 # LGPLv3
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
|
3
tox.ini
3
tox.ini
@ -62,9 +62,10 @@ commands = oslo_debug_helper -t neutron_tempest_plugin/ {posargs}
|
||||
# E126 continuation line over-indented for hanging indent
|
||||
# E128 continuation line under-indented for visual indent
|
||||
# E129 visually indented line with same indent as next logical line
|
||||
# I202 Additional newline in a group of imports.
|
||||
# N530 direct neutron imports not allowed
|
||||
# W504 line break after binary operator
|
||||
ignore = E126,E128,E129,N530,W504
|
||||
ignore = E126,E128,E129,I202,N530,W504
|
||||
# H106: Don't put vim configuration in source files
|
||||
# H203: Use assertIs(Not)None to check for None
|
||||
# H204: Use assert(Not)Equal to check for equality
|
||||
|
Loading…
x
Reference in New Issue
Block a user