Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/gold_tests/autest-site/copy_config.test.ext
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
Expand Down
10 changes: 8 additions & 2 deletions tests/gold_tests/autest-site/microserver.test.ext
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions tests/gold_tests/autest-site/trafficserver.test.ext
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions tests/gold_tests/command_argument/verify_remap_plugin.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def create_ts_process():
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")


Expand All @@ -121,7 +122,8 @@ def create_ts_process():
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")


Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/continuations/double.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# 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\
Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/continuations/double_h2.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

# 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\
Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/continuations/openclose.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"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)
Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/continuations/openclose_h2.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
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)
Expand Down
7 changes: 6 additions & 1 deletion tests/gold_tests/tls/tls_hooks_verify.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@
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)
Expand Down