You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/10/08 20:36:33 UTC
[trafficserver] branch 9.0.x updated: Running autopep8 on the 9.0.x
branch. (#7222)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 84636d8 Running autopep8 on the 9.0.x branch. (#7222)
84636d8 is described below
commit 84636d8280b650d0cfc858e943747f404c1035bc
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Thu Oct 8 15:36:19 2020 -0500
Running autopep8 on the 9.0.x branch. (#7222)
Co-authored-by: bneradt <bn...@verizonmedia.com>
---
tests/gold_tests/autest-site/copy_config.test.ext | 2 +-
tests/gold_tests/autest-site/microserver.test.ext | 10 ++++++++--
tests/gold_tests/autest-site/trafficserver.test.ext | 5 +++--
tests/gold_tests/command_argument/verify_remap_plugin.test.py | 6 ++++--
tests/gold_tests/continuations/double.test.py | 2 +-
tests/gold_tests/continuations/double_h2.test.py | 2 +-
tests/gold_tests/continuations/openclose.test.py | 2 +-
tests/gold_tests/continuations/openclose_h2.test.py | 2 +-
tests/gold_tests/tls/tls_hooks_verify.test.py | 7 ++++++-
9 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/tests/gold_tests/autest-site/copy_config.test.ext b/tests/gold_tests/autest-site/copy_config.test.ext
index 72a9ba6..d710240 100755
--- a/tests/gold_tests/autest-site/copy_config.test.ext
+++ b/tests/gold_tests/autest-site/copy_config.test.ext
@@ -34,7 +34,7 @@ class CopyATSConfig(SetupItem):
process = self.process if self.process else self
try:
ts_dir = process.Env['TS_ROOT']
- except:
+ except BaseException:
if self.process:
raise SetupError(
'TS_ROOT is not defined. Cannot copy ats config file without location to copy to.'
diff --git a/tests/gold_tests/autest-site/microserver.test.ext b/tests/gold_tests/autest-site/microserver.test.ext
index 5be699b..e5c9c25 100644
--- a/tests/gold_tests/autest-site/microserver.test.ext
+++ b/tests/gold_tests/autest-site/microserver.test.ext
@@ -59,8 +59,14 @@ def getHeaderFieldVal(request_header, field):
# addResponse adds customized response with respect to request_header. request_header and response_header are both dictionaries
def addResponse(self, filename, request_header, response_header):
- client_request = Request.fromRequestLine(request_header["headers"], request_header["body"], None if "options" not in request_header else request_header["options"])
- server_response = Response.fromRequestLine(response_header["headers"], response_header["body"], None if "options" not in response_header else response_header["options"])
+ client_request = Request.fromRequestLine(
+ request_header["headers"],
+ request_header["body"],
+ None if "options" not in request_header else request_header["options"])
+ server_response = Response.fromRequestLine(
+ response_header["headers"],
+ response_header["body"],
+ None if "options" not in response_header else response_header["options"])
# timestamp field is left None because that needs to be revised for better implementation
txn = Transaction(client_request, None, server_response, None, None, None)
diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext b/tests/gold_tests/autest-site/trafficserver.test.ext
index 423af0f..8c3a7e4 100755
--- a/tests/gold_tests/autest-site/trafficserver.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver.test.ext
@@ -63,7 +63,7 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enabl
p = obj.Processes.Process(name, command)
#p_debug = obj.Processes.Process("port-debug", "ss --listen --tcp --process")
#p_debug.Env['PATH'] = "/usr/sbin" + os.pathsep + p.ComposeEnv()['PATH']
- #p.StartBefore(p_debug)
+ # p.StartBefore(p_debug)
# we want to have a few directories more fixed
# this helps with debugging as location are common
# we do this by overiding locations from the "layout"
@@ -289,7 +289,8 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enabl
port_str = "{port} {v6_port}:ipv6 ".format(port=p.Variables.port, v6_port=p.Variables.portv6)
if enable_tls:
- port_str += "{ssl_port}:ssl {ssl_portv6}:ssl:ipv6".format(ssl_port=p.Variables.ssl_port,ssl_portv6=p.Variables.ssl_portv6)
+ port_str += "{ssl_port}:ssl {ssl_portv6}:ssl:ipv6".format(
+ ssl_port=p.Variables.ssl_port, ssl_portv6=p.Variables.ssl_portv6)
p.Env['PROXY_CONFIG_HTTP_SERVER_PORTS'] = port_str
diff --git a/tests/gold_tests/command_argument/verify_remap_plugin.test.py b/tests/gold_tests/command_argument/verify_remap_plugin.test.py
index dcd062d..2a7bcc7 100644
--- a/tests/gold_tests/command_argument/verify_remap_plugin.test.py
+++ b/tests/gold_tests/command_argument/verify_remap_plugin.test.py
@@ -98,7 +98,8 @@ tr.Processes.Default.StartBefore(ts)
tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
"ERROR: .*missing required function TSRemapInit",
"Should warn about the need for the TSRemapInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
+ts.Disk.diags_log.Content = Testers.ContainsExpression(
+ "ERROR",
"ERROR: .*missing required function TSRemapInit")
@@ -121,7 +122,8 @@ tr.Processes.Default.StartBefore(ts)
tr.Processes.Default.Streams.stderr = Testers.ContainsExpression(
"ERROR: .*missing required function TSRemapInit",
"Should warn about the need for the TSRemapInit symbol")
-ts.Disk.diags_log.Content = Testers.ContainsExpression("ERROR",
+ts.Disk.diags_log.Content = Testers.ContainsExpression(
+ "ERROR",
"ERROR: .*missing required function TSRemapInit")
diff --git a/tests/gold_tests/continuations/double.test.py b/tests/gold_tests/continuations/double.test.py
index d81582d..dd13f9f 100644
--- a/tests/gold_tests/continuations/double.test.py
+++ b/tests/gold_tests/continuations/double.test.py
@@ -56,7 +56,7 @@ ts.Disk.records_config.update({
# add plugin to assist with test metrics
Test.PrepareTestPlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
- 'continuations_verify.so'), ts)
+ 'continuations_verify.so'), ts)
comparator_command = '''
if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get continuations_verify.{0}.close.2 | cut -d ' ' -f 2`" ; then\
diff --git a/tests/gold_tests/continuations/double_h2.test.py b/tests/gold_tests/continuations/double_h2.test.py
index ea76492..cf046a8 100644
--- a/tests/gold_tests/continuations/double_h2.test.py
+++ b/tests/gold_tests/continuations/double_h2.test.py
@@ -66,7 +66,7 @@ ts.Disk.records_config.update({
# add plugin to assist with test metrics
Test.PrepareTestPlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
- 'continuations_verify.so'), ts)
+ 'continuations_verify.so'), ts)
comparator_command = '''
if test "`traffic_ctl metric get continuations_verify.{0}.close.1 | cut -d ' ' -f 2`" -eq "`traffic_ctl metric get continuations_verify.{0}.close.2 | cut -d ' ' -f 2`" ; then\
diff --git a/tests/gold_tests/continuations/openclose.test.py b/tests/gold_tests/continuations/openclose.test.py
index ee66f22..7b88420 100644
--- a/tests/gold_tests/continuations/openclose.test.py
+++ b/tests/gold_tests/continuations/openclose.test.py
@@ -36,7 +36,7 @@ response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-L
"timestamp": "1469733493.993", "body": ""}
Test.PrepareTestPlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
- 'ssntxnorder_verify.so'), ts)
+ 'ssntxnorder_verify.so'), ts)
# add response to the server dictionary
server.addResponse("sessionfile.log", request_header, response_header)
diff --git a/tests/gold_tests/continuations/openclose_h2.test.py b/tests/gold_tests/continuations/openclose_h2.test.py
index db5ba69..7c62de9 100644
--- a/tests/gold_tests/continuations/openclose_h2.test.py
+++ b/tests/gold_tests/continuations/openclose_h2.test.py
@@ -44,7 +44,7 @@ ts.addSSLfile("ssl/server.pem")
ts.addSSLfile("ssl/server.key")
Test.PrepareTestPlugin(os.path.join(Test.Variables.AtsTestPluginsDir,
- 'ssntxnorder_verify.so'), ts)
+ 'ssntxnorder_verify.so'), ts)
# add response to the server dictionary
server.addResponse("sessionfile.log", request_header, response_header)
diff --git a/tests/gold_tests/tls/tls_hooks_verify.test.py b/tests/gold_tests/tls/tls_hooks_verify.test.py
index 44dc888..70e26a8 100644
--- a/tests/gold_tests/tls/tls_hooks_verify.test.py
+++ b/tests/gold_tests/tls/tls_hooks_verify.test.py
@@ -65,7 +65,12 @@ ts.Disk.sni_yaml.AddLine(
ts.Disk.sni_yaml.AddLine(
' verify_server_policy: PERMISSIVE')
-Test.PrepareTestPlugin(os.path.join(Test.Variables.AtsTestPluginsDir, 'ssl_verify_test.so'), ts, '-count=2 -bad=random.com -bad=bar.com')
+Test.PrepareTestPlugin(
+ os.path.join(
+ Test.Variables.AtsTestPluginsDir,
+ 'ssl_verify_test.so'),
+ ts,
+ '-count=2 -bad=random.com -bad=bar.com')
tr = Test.AddTestRun("request good name")
tr.Processes.Default.StartBefore(server)