From 5041723024bb33d805b0709dc2c7a75a002362d9 Mon Sep 17 00:00:00 2001 From: bneradt Date: Thu, 18 Jun 2020 19:50:48 +0000 Subject: [PATCH 1/2] AuTest: Log and When condition for ATS initialized This aims to make the AuTests more reliable by providing a log message from traffic server wich the AutTests can use as a ready condition before the tests are started. Many tests, however, override the default MakeATSProcess ready condition. This was generally not uneccesary since they almost alway overwrote it with the same PortOpen When Ready condidtion. In any case, to take advantage of the new Ready, the tests have to be cleaned up to not set their own Ready. While doing this, I added the enable_cache directive to make setting the cache or not a more convenient mechanism for the MakeATSProcess caller. --- src/traffic_server/traffic_server.cc | 52 ++++++++++++++-- .../autest-site/copy_config.test.ext | 55 ----------------- .../autest-site/traffic_replay.test.ext | 2 +- .../autest-site/trafficserver.test.ext | 25 ++++++-- tests/gold_tests/autest-site/when.test.ext | 60 +++++++++++++++++-- tests/gold_tests/basic/config.test.py | 4 +- .../basic/config/records_8090.config | 2 - .../basic/config/records_8091.config | 2 - tests/gold_tests/basic/config/remap.config | 1 - tests/gold_tests/basic/copy_config.test.py | 8 ++- tests/gold_tests/basic/copy_config2.test.py | 4 +- tests/gold_tests/basic/deny0.test.py | 5 +- tests/gold_tests/bigobj/bigobj.test.py | 6 +- tests/gold_tests/cache/cache-control.test.py | 4 +- .../cache/cache-generation-clear.test.py | 3 +- .../cache/cache-generation-disjoint.test.py | 4 +- .../cache/disjoint-wait-for-cache.test.py | 3 +- .../chunked_encoding/chunked_encoding.test.py | 3 +- tests/gold_tests/continuations/double.test.py | 6 +- .../continuations/double_h2.test.py | 5 +- .../continuations/openclose.test.py | 7 +-- .../continuations/openclose_h2.test.py | 7 +-- .../continuations/session_id.test.py | 7 +-- tests/gold_tests/h2/h2enable.test.py | 2 +- .../h2/h2enable_no_accept_threads.test.py | 2 +- tests/gold_tests/h2/h2spec.test.py | 7 +-- tests/gold_tests/h2/http2.test.py | 4 +- tests/gold_tests/h2/http2_priority.test.py | 3 +- tests/gold_tests/h2/httpbin.test.py | 3 +- tests/gold_tests/h2/nghttp.test.py | 5 +- .../headers/cache_and_req_body.test.py | 4 +- .../gold_tests/headers/cachedIMSRange.test.py | 4 +- tests/gold_tests/headers/forwarded.test.py | 9 +-- tests/gold_tests/headers/normalize_ae.test.py | 6 +- tests/gold_tests/headers/syntax.test.py | 2 +- tests/gold_tests/headers/via.test.py | 2 +- tests/gold_tests/ip_allow/ip_allow.test.py | 6 +- tests/gold_tests/logging/all_headers.test.py | 3 - tests/gold_tests/logging/custom-log.test.py | 1 - tests/gold_tests/logging/log-field.test.py | 3 +- tests/gold_tests/logging/log-filter.test.py | 3 +- .../gold_tests/logging/log_retention.test.py | 1 - .../cache_range_requests.test.py | 4 +- .../cache_range_requests_cachekey.test.py | 4 +- .../cache_range_requests_ims.test.py | 4 +- .../cert_update/cert_update.test.py | 2 +- .../combo_handler/combo_handler.test.py | 4 +- .../pluginTest/compress/compress.test.py | 5 +- .../cookie_remap/bucketcookie.test.py | 1 - .../cookie_remap/collapseslashes.test.py | 1 - .../pluginTest/cookie_remap/connector.test.py | 1 - .../cookie_remap/existscookie.test.py | 1 - .../cookie_remap/matchcookie.test.py | 1 - .../pluginTest/cookie_remap/matchuri.test.py | 1 - .../cookie_remap/matrixparams.test.py | 1 - .../cookie_remap/notexistscookie.test.py | 1 - .../cookie_remap/regexcookie.test.py | 1 - .../pluginTest/cookie_remap/subcookie.test.py | 1 - .../cookie_remap/substitute.test.py | 1 - .../header_rewrite/header_rewrite.test.py | 1 - .../pluginTest/lua/lua_states_stats.test.py | 4 +- .../pluginTest/lua/lua_watermark.test.py | 6 +- .../regex_remap/regex_remap.test.py | 3 +- .../regex_revalidate/regex_revalidate.test.py | 2 - .../gold_tests/pluginTest/slice/slice.test.py | 13 ++-- .../pluginTest/slice/slice_error.test.py | 6 +- .../pluginTest/slice/slice_regex.test.py | 8 +-- .../slice/slice_selfhealing.test.py | 13 ++-- .../pluginTest/sslheaders/sslheaders.test.py | 5 +- .../pluginTest/test_hooks/hook_add.test.py | 6 +- .../pluginTest/test_hooks/test_hooks.test.py | 8 +-- .../traffic_dump/traffic_dump.test.py | 2 - .../gold_tests/pluginTest/tsapi/tsapi.test.py | 8 +-- .../uri_signing/uri_signing.test.py | 3 +- .../pluginTest/url_sig/url_sig.test.py | 6 +- .../post_slow_server/post_slow_server.test.py | 3 +- tests/gold_tests/redirect/redirect.test.py | 3 +- .../redirect/redirect_actions.test.py | 3 +- .../gold_tests/redirect/redirect_post.test.py | 3 +- tests/gold_tests/remap/remap_http.test.py | 1 - tests/gold_tests/remap/remap_https.test.py | 4 +- .../gold_tests/timeout/active_timeout.test.py | 2 +- .../timeout/inactive_timeout.test.py | 2 +- tests/gold_tests/timeout/timeout.test.py | 2 +- tests/gold_tests/tls/tls.test.py | 3 +- tests/gold_tests/tls/tls_0rtt_server.test.py | 2 +- .../tls/tls_check_cert_selection.test.py | 2 +- .../tls/tls_check_dual_cert_selection.test.py | 2 +- tests/gold_tests/tls/tls_client_cert2.test.py | 4 +- tests/gold_tests/tls/tls_hooks_verify.test.py | 2 +- .../gold_tests/tls/tls_session_cache.test.py | 1 - tests/gold_tests/tls/tls_ticket.test.py | 1 - tests/gold_tests/tls/tls_verify.test.py | 1 - .../tls/tls_verify_not_pristine.test.py | 1 - .../gold_tests/tls_hooks/tls_hooks16.test.py | 2 +- .../gold_tests/tls_hooks/tls_hooks17.test.py | 2 +- .../gold_tests/tls_hooks/tls_hooks18.test.py | 2 +- 97 files changed, 247 insertions(+), 274 deletions(-) delete mode 100755 tests/gold_tests/autest-site/copy_config.test.ext delete mode 100644 tests/gold_tests/basic/config/records_8090.config delete mode 100644 tests/gold_tests/basic/config/records_8091.config delete mode 100644 tests/gold_tests/basic/config/remap.config diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc index 6153edd22a1..f7cffccb6df 100644 --- a/src/traffic_server/traffic_server.cc +++ b/src/traffic_server/traffic_server.cc @@ -45,6 +45,7 @@ #include #include +#include #include #include @@ -173,10 +174,10 @@ static int poll_timeout = -1; // No value set. static int cmd_disable_freelist = 0; static bool signal_received[NSIG]; -// 1: delay listen, wait for cache. -// 0: Do not delay, start listen ASAP. +// 1: the main thread delayed accepting, start accepting. +// 0: delay accept, wait for cache initialization. // -1: cache is already initialized, don't delay. -static int delay_listen_for_cache_p; +static int delay_listen_for_cache = 0; AppVersionInfo appVersionInfo; // Build info for this application @@ -452,6 +453,33 @@ class MemoryLimit : public Continuation struct rusage _usage; }; +/** Gate the emission of the "Traffic Server is fuly initialized" log message. + * + * This message is intended to be helpful to users who want to know that + * Traffic Server is not just running but has become fully initialized and is + * ready to optimize traffic. This is in contrast to the "traffic server is + * running" message which can be printed before either of these conditions. + * + * This function is called on each initialization state transition. Currently, + * the two state transitions of interest are: + * + * 1. The cache is initialized. + * 2. The ports are open and accept has been called upon them. + */ +static void +emit_fully_initialized_message() +{ + static std::atomic initialization_state_counter = 0; + + // See the doxygen comment above explaining what the states are that + // constitute Traffic Server being fully initialized. + constexpr unsigned int num_initialization_states = 2; + + if (++initialization_state_counter == num_initialization_states) { + Note("Traffic Server is fully initialized."); + } +} + void set_debug_ip(const char *ip_string) { @@ -709,7 +737,8 @@ CB_After_Cache_Init() APIHook *hook; int start; - start = ink_atomic_swap(&delay_listen_for_cache_p, -1); + start = ink_atomic_swap(&delay_listen_for_cache, -1); + emit_fully_initialized_message(); #if TS_ENABLE_FIPS == 0 // Check for cache BC after the cache is initialized and before listen, if possible. @@ -724,8 +753,12 @@ CB_After_Cache_Init() #endif if (1 == start) { + // The delay_listen_for_cache value was 1, therefore the main function + // delayed the call to start_HttpProxyServer until we got here. We must + // call accept on the ports now that the cache is initialized. Debug("http_listen", "Delayed listen enable, cache initialization finished"); start_HttpProxyServer(); + emit_fully_initialized_message(); } time_t cache_ready_at = time(nullptr); @@ -2091,10 +2124,19 @@ main(int /* argc ATS_UNUSED */, const char **argv) // Delay only if config value set and flag value is zero // (-1 => cache already initialized) - if (delay_p && ink_atomic_cas(&delay_listen_for_cache_p, 0, 1)) { + if (delay_p && ink_atomic_cas(&delay_listen_for_cache, 0, 1)) { Debug("http_listen", "Delaying listen, waiting for cache initialization"); } else { + // If we've come here, either: + // + // 1. The user did not configure wait_for_cache, and/or + // 2. The previous delay_listen_for_cache value was not 0, thus the cache + // must have been initialized already. + // + // In either case we should not delay to accept the ports. + Debug("http_listen", "Not delaying listen"); start_HttpProxyServer(); // PORTS_READY_HOOK called from in here + emit_fully_initialized_message(); } } // Plugins can register their own configuration names so now after they've done that diff --git a/tests/gold_tests/autest-site/copy_config.test.ext b/tests/gold_tests/autest-site/copy_config.test.ext deleted file mode 100755 index 72a9ba6da21..00000000000 --- a/tests/gold_tests/autest-site/copy_config.test.ext +++ /dev/null @@ -1,55 +0,0 @@ -''' -''' -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -import os -from future.utils import native_str - - -class CopyATSConfig(SetupItem): - def __init__(self, file, targetname=None, process=None): - super(CopyATSConfig, self).__init__(itemname="CopyATSConfig") - self.file = file - # some protection - if process is None and not isinstance(targetname, native_str): - self.process = targetname - else: - self.process = process - self.targetname = targetname - - def setup(self): - process = self.process if self.process else self - try: - ts_dir = process.Env['TS_ROOT'] - except: - if self.process: - raise SetupError( - 'TS_ROOT is not defined. Cannot copy ats config file without location to copy to.' - ) - else: - raise SetupError( - 'TS_ROOT is not defined. Cannot copy ats config file without location to copy to. Please pass in an ATS process object' - ) - - # set up the config path for test manually - config_dir = os.path.join(ts_dir, "config") - - host.WriteVerbose("CopyATSConfig", "Copying {0} to {1}".format( - self.file, config_dir)) - self.CopyAs(self.file, config_dir, self.targetname) - - -AddSetupItem(CopyATSConfig, "CopyConfig", ns="ts") diff --git a/tests/gold_tests/autest-site/traffic_replay.test.ext b/tests/gold_tests/autest-site/traffic_replay.test.ext index 0779dd5d0d3..7b87c6c10af 100644 --- a/tests/gold_tests/autest-site/traffic_replay.test.ext +++ b/tests/gold_tests/autest-site/traffic_replay.test.ext @@ -80,7 +80,7 @@ def Replay(obj, name, replay_dir, key=None, cert=None, conn_type='mixed', option tr.Setup.MakeDir(data_dir) tr.Setup.Copy(replay_dir, data_dir) tr.Processes.Default.StartBefore(server) - tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.ssl_port)) + tr.Processes.Default.StartBefore(ts) tr.Processes.Default.StartBefore(dns) tr.ReturnCode = Any(None, 0) tr.Processes.Default.Streams.All = Testers.ExcludesExpression("FAIL", "No fails allowed.") diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext b/tests/gold_tests/autest-site/trafficserver.test.ext index 779f183e373..e01507c8afc 100755 --- a/tests/gold_tests/autest-site/trafficserver.test.ext +++ b/tests/gold_tests/autest-site/trafficserver.test.ext @@ -28,7 +28,8 @@ def make_id(s): # this forms is for the global process define -def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enable_tls=False): +def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, + enable_tls=False, enable_cache=True): ##################################### # common locations @@ -281,10 +282,26 @@ def MakeATSProcess(obj, name, command='traffic_server', select_ports=True, enabl get_port(p, "manager_port") get_port(p, "admin_port") - if enable_tls: - p.Ready = When.PortsOpen([p.Variables.port, p.Variables.ssl_port]) + if enable_cache: + # In records.config, the cache is enabled by default so there's nothing + # we have to do here to functionally enable it. However, the tests that + # rely upon the cache will not function correctly if ATS starts + # processing traffic before the cache is ready. Thus we set the + # wait_for_cache configuration. + p.Disk.records_config.update({ + # Do not accept connections from clients until cache subsystem is + # operational. + 'proxy.config.http.wait_for_cache': 1, + }) else: - p.Ready = When.PortOpen(p.Variables.port) + # The user wants the cache to be disabled. + p.Disk.records_config.update({ + 'proxy.config.http.cache.http': 0 + }) + + # The following message was added so that tests and users can know when + # Traffic Server is ready to both receive and optimize traffic. + p.Ready = When.FileContains(p.Disk.diags_log.AbsPath, "NOTE: Traffic Server is fully initialized") if select_ports: # default config diff --git a/tests/gold_tests/autest-site/when.test.ext b/tests/gold_tests/autest-site/when.test.ext index d44c9ba09cc..3bd5528697b 100644 --- a/tests/gold_tests/autest-site/when.test.ext +++ b/tests/gold_tests/autest-site/when.test.ext @@ -19,18 +19,66 @@ When extensions. from autest.api import AddWhenFunction import hosts.output as host +import os +import re -def FileContains(haystack, needle): +def FileContains(haystack, needle, desired_count=1): + """ + Return whether the file haystack contains the string needle. + + Args: + haystack (str): The path to the file to be inspected. + needle (str): The content to look for in haystack. This can be a + regular expression which will be used in Python's re.search + function. + desired_count (int): How many times the caller desires to see needle in + haystack before considering the When condition fulfilled. + + Returns: + True if the haystack exists as a file and contains needle, False + otherwise. + """ + + if desired_count < 0: + raise ValueError("Cannot pass a negative desired_count value to FileContains.") + if desired_count == 0: + raise ValueError("Cannot pass a desired_count of 0 to FileContains.") + + if not os.path.exists(haystack): + host.WriteDebug( + ['FileContains', 'when'], + "Testing for file content '{0}' in file '{1}': file does not exist".format( + needle, haystack)) + return False + with open(haystack) as f: - result = needle in f.read() + needle_seen_count = 0 + line_count = 0 + for line in f: + line_count += 1 + if re.search(needle, line): + host.WriteDebug( + ['FileContains', 'when'], + "Found '{0}' in file '{1}' in line: '{2}', line number: {3}".format( + needle, haystack, line.rstrip(), line_count)) + needle_seen_count += 1 + + if needle_seen_count >= desired_count: + host.WriteDebug( + ['FileContains', 'when'], + "Testing for file content '{0}' in file '{1}', " + "successfully found it the desired {2} times".format( + needle, haystack, needle_seen_count)) + return True host.WriteDebug( - ['FileExists', 'when'], - "Testing for file content '{0}' in '{1}' : {2}".format( - needle, haystack, result)) + ['FileContains', 'when'], + "Testing for file content '{0}' in file '{1}', only seen {2} " + "out of the desired {3} times".format( + needle, haystack, needle_seen_count, desired_count)) - return result + return False AddWhenFunction(FileContains) diff --git a/tests/gold_tests/basic/config.test.py b/tests/gold_tests/basic/config.test.py index bfe048b1854..d2d8c7f0429 100644 --- a/tests/gold_tests/basic/config.test.py +++ b/tests/gold_tests/basic/config.test.py @@ -19,8 +19,10 @@ Test.Summary = "Test start up of Traffic server with configuration modification of starting port" ts = Test.MakeATSProcess("ts", select_ports=False) -ts.Setup.ts.CopyConfig('config/records_8090.config', "records.config") ts.Variables.port = 8090 +ts.Disk.records_config.update({ + 'proxy.config.http.server_ports': str(ts.Variables.port), +}) ts.Ready = When.PortOpen(ts.Variables.port) t = Test.AddTestRun("Test traffic server started properly") t.Processes.Default.StartBefore(ts) diff --git a/tests/gold_tests/basic/config/records_8090.config b/tests/gold_tests/basic/config/records_8090.config deleted file mode 100644 index ca56e77b264..00000000000 --- a/tests/gold_tests/basic/config/records_8090.config +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG proxy.config.http.server_ports STRING 8090 - diff --git a/tests/gold_tests/basic/config/records_8091.config b/tests/gold_tests/basic/config/records_8091.config deleted file mode 100644 index 1b560d820c8..00000000000 --- a/tests/gold_tests/basic/config/records_8091.config +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG proxy.config.http.server_ports STRING 8091 - diff --git a/tests/gold_tests/basic/config/remap.config b/tests/gold_tests/basic/config/remap.config deleted file mode 100644 index 553b66b2da9..00000000000 --- a/tests/gold_tests/basic/config/remap.config +++ /dev/null @@ -1 +0,0 @@ -regex_map http://(.*)/ http://localhost:9999/ \ No newline at end of file diff --git a/tests/gold_tests/basic/copy_config.test.py b/tests/gold_tests/basic/copy_config.test.py index 612f6531440..7b98b9b78bb 100644 --- a/tests/gold_tests/basic/copy_config.test.py +++ b/tests/gold_tests/basic/copy_config.test.py @@ -20,13 +20,17 @@ # set up some ATS processes ts1 = Test.MakeATSProcess("ts1", select_ports=False) -ts1.Setup.ts.CopyConfig('config/records_8090.config', 'records.config') ts1.Variables.port = 8090 +ts1.Disk.records_config.update({ + 'proxy.config.http.server_ports': str(ts1.Variables.port), +}) ts1.Ready = When.PortOpen(ts1.Variables.port) ts2 = Test.MakeATSProcess("ts2", select_ports=False) -ts2.Setup.ts.CopyConfig('config/records_8091.config', 'records.config') ts2.Variables.port = 8091 +ts2.Disk.records_config.update({ + 'proxy.config.http.server_ports': str(ts2.Variables.port), +}) ts2.Ready = When.PortOpen(ts2.Variables.port) # setup a testrun diff --git a/tests/gold_tests/basic/copy_config2.test.py b/tests/gold_tests/basic/copy_config2.test.py index 3fb5bdb7696..0c3ff37063b 100644 --- a/tests/gold_tests/basic/copy_config2.test.py +++ b/tests/gold_tests/basic/copy_config2.test.py @@ -29,8 +29,8 @@ p = t.Processes.Default p.Command = "curl 127.0.0.1:{0}".format(ts1.Variables.port) p.ReturnCode = 0 -p.StartBefore(Test.Processes.ts1, ready=When.PortOpen(ts1.Variables.port)) -p.StartBefore(Test.Processes.ts2, ready=When.PortOpen(ts2.Variables.port)) +p.StartBefore(Test.Processes.ts1) +p.StartBefore(Test.Processes.ts2) # setup a testrun t = Test.AddTestRun("Talk to ts2") diff --git a/tests/gold_tests/basic/deny0.test.py b/tests/gold_tests/basic/deny0.test.py index 4cacd14d783..a77621fcee7 100644 --- a/tests/gold_tests/basic/deny0.test.py +++ b/tests/gold_tests/basic/deny0.test.py @@ -31,13 +31,12 @@ dns = Test.MakeDNServer("dns") dns.addRecords(records={HOST1: ['127.0.0.1']}) -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1 ,'proxy.config.diags.debug.tags': 'http|dns|redirect' ,'proxy.config.http.redirection_enabled': 1 ,'proxy.config.http.number_of_redirections': 1 - ,'proxy.config.http.cache.http': 0 ,'proxy.config.dns.nameservers': '127.0.0.1:{0}'.format(dns.Variables.Port) ,'proxy.config.dns.resolv_conf': 'NULL' ,'proxy.config.url_remap.remap_required': 0 # need this so the domain gets a chance to be evaluated through DNS @@ -58,7 +57,7 @@ def buildMetaTest(testName, requestString): global isFirstTest if isFirstTest: isFirstTest = False - tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) + tr.Processes.Default.StartBefore(ts) tr.Processes.Default.StartBefore(redirect_serv, ready=When.PortOpen(redirect_serv.Variables.Port)) tr.Processes.Default.StartBefore(dns) with open(os.path.join(data_path, tr.Name), 'w') as f: diff --git a/tests/gold_tests/bigobj/bigobj.test.py b/tests/gold_tests/bigobj/bigobj.test.py index 21ae1641b2c..9bfdff2712e 100644 --- a/tests/gold_tests/bigobj/bigobj.test.py +++ b/tests/gold_tests/bigobj/bigobj.test.py @@ -35,12 +35,8 @@ ts.addSSLfile("ssl/server.key") ts.Disk.records_config.update({ - # Do not accept connections from clients until cache subsystem is operational. - 'proxy.config.http.wait_for_cache': 1, - 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http|dns|cache', - 'proxy.config.http.cache.http': 1, # enable caching. 'proxy.config.http.cache.required_headers': 0, # No required headers for caching 'proxy.config.http.push_method_enabled': 1, 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. @@ -78,7 +74,7 @@ tr = Test.AddTestRun() # Delay on readiness of TS IPv4 ssl port -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) # # Put object with URL http://localhost/bigobj in cache using PUSH request. tr.Processes.Default.Command = ( diff --git a/tests/gold_tests/cache/cache-control.test.py b/tests/gold_tests/cache/cache-control.test.py index cf3caf63b09..2cc8fa1944f 100644 --- a/tests/gold_tests/cache/cache-control.test.py +++ b/tests/gold_tests/cache/cache-control.test.py @@ -45,8 +45,6 @@ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http', 'proxy.config.http.response_via_str': 3, - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, 'proxy.config.http.insert_age_in_response': 0, }) @@ -57,7 +55,7 @@ # Test 1 - 200 response and cache fill tr = Test.AddTestRun() tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=1) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Command = 'curl -s -D - -v --ipv4 --http1.1 -H "x-debug: x-cache,via" -H "Host: www.example.com" http://localhost:{port}/max_age_10sec'.format(port=ts.Variables.port) tr.Processes.Default.ReturnCode = 0 tr.Processes.Default.Streams.stdout = "gold/cache_and_req_body-miss.gold" diff --git a/tests/gold_tests/cache/cache-generation-clear.test.py b/tests/gold_tests/cache/cache-generation-clear.test.py index 2f801b1bdf1..e066aee4854 100644 --- a/tests/gold_tests/cache/cache-generation-clear.test.py +++ b/tests/gold_tests/cache/cache-generation-clear.test.py @@ -50,8 +50,7 @@ tr.Processes.Default.Command = 'curl "http://127.0.0.1:{0}/default/cache/10/{1}" -H "x-debug: x-cache,x-cache-key,via,x-cache-generation" --verbose'.format( ts.Variables.port, objectid) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=5) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.All = "gold/miss_default-1.gold" # Second touch is a HIT for default. diff --git a/tests/gold_tests/cache/cache-generation-disjoint.test.py b/tests/gold_tests/cache/cache-generation-disjoint.test.py index e6da37b6d3d..d2d0491b0ca 100644 --- a/tests/gold_tests/cache/cache-generation-disjoint.test.py +++ b/tests/gold_tests/cache/cache-generation-disjoint.test.py @@ -30,7 +30,6 @@ ts.Disk.records_config.update({ 'proxy.config.body_factory.enable_customizations': 3, # enable domain specific body factory 'proxy.config.http.cache.generation': -1, # Start with cache turned off - 'proxy.config.http.wait_for_cache': 1, 'proxy.config.config_update_interval_ms': 1, }) @@ -53,8 +52,7 @@ tr.Processes.Default.Command = 'curl "http://127.0.0.1:{0}/default/cache/10/{1}" -H "x-debug: x-cache,x-cache-key,via,x-cache-generation" --verbose'.format( ts.Variables.port, objectid) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=2) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.All = "gold/miss_default-1.gold" # Same URL in generation 1 is a MISS. diff --git a/tests/gold_tests/cache/disjoint-wait-for-cache.test.py b/tests/gold_tests/cache/disjoint-wait-for-cache.test.py index a0a20f4ae62..44fbbdd8bbf 100644 --- a/tests/gold_tests/cache/disjoint-wait-for-cache.test.py +++ b/tests/gold_tests/cache/disjoint-wait-for-cache.test.py @@ -27,7 +27,8 @@ # Define default ATS ts = Test.MakeATSProcess("ts") -# setup some config file for this server +# Setup some config file for this server. Note that setting wait_for_cache to 3 +# will intentionally override the value set in MakeATSProcess. ts.Disk.records_config.update({ 'proxy.config.body_factory.enable_customizations': 3, # enable domain specific body factory 'proxy.config.http.cache.generation': -1, # Start with cache turned off diff --git a/tests/gold_tests/chunked_encoding/chunked_encoding.test.py b/tests/gold_tests/chunked_encoding/chunked_encoding.test.py index fdea2517d88..91d3a53f62c 100644 --- a/tests/gold_tests/chunked_encoding/chunked_encoding.test.py +++ b/tests/gold_tests/chunked_encoding/chunked_encoding.test.py @@ -91,7 +91,7 @@ ) # build test code -tr=Test.Build(target='smuggle-client',sources=['smuggle-client.c']) +tr = Test.Build(target='smuggle-client', sources=['smuggle-client.c']) tr.TimeOut = 5 tr.Setup.Copy('smuggle-client.c') @@ -101,7 +101,6 @@ tr.Processes.Default.Command = 'curl --http1.1 --proxy 127.0.0.1:{0} http://www.example.com --verbose'.format( ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(server2) tr.Processes.Default.StartBefore(server3) diff --git a/tests/gold_tests/continuations/double.test.py b/tests/gold_tests/continuations/double.test.py index ab830cde26f..2f403155d19 100644 --- a/tests/gold_tests/continuations/double.test.py +++ b/tests/gold_tests/continuations/double.test.py @@ -23,8 +23,8 @@ ''' Test.ContinueOnFail = True -# Define default ATS -ts = Test.MakeATSProcess("ts", select_ports=True, command="traffic_manager") +# Define default ATS. Disable the cache to simplify the test. +ts = Test.MakeATSProcess("ts", select_ports=True, command="traffic_manager", enable_cache=False) server = Test.MakeOriginServer("server") server2 = Test.MakeOriginServer("server2") @@ -47,7 +47,6 @@ 'proxy.config.diags.debug.tags': 'continuations_verify.*', 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), - 'proxy.config.http.cache.http': 0, # disable cache to simply the test. 'proxy.config.cache.enable_read_while_writer': 0, 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2', @@ -82,7 +81,6 @@ # Execution order is: ts/server, ps(curl cmds), Default Process. tr.Processes.Default.StartBefore( server, ready=When.PortOpen(server.Variables.Port)) -# Adds a delay once the ts port is ready. This is because we cannot test the ts state. tr.Processes.Default.StartBefore(Test.Processes.ts) ts.StartAfter(*ps) server.StartAfter(*ps) diff --git a/tests/gold_tests/continuations/double_h2.test.py b/tests/gold_tests/continuations/double_h2.test.py index 8cf025add2e..0ff6655ee10 100644 --- a/tests/gold_tests/continuations/double_h2.test.py +++ b/tests/gold_tests/continuations/double_h2.test.py @@ -25,8 +25,8 @@ Condition.HasCurlFeature('http2') ) Test.ContinueOnFail = True -# Define default ATS -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, command="traffic_manager") +# Define default ATS. Disable the cache to simplify the test. +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, command="traffic_manager", enable_cache=False) server = Test.MakeOriginServer("server") server2 = Test.MakeOriginServer("server2") @@ -57,7 +57,6 @@ 'proxy.config.diags.debug.tags': 'continuations_verify', 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), - 'proxy.config.http.cache.http': 0, # disable cache to simply the test. 'proxy.config.cache.enable_read_while_writer': 0, 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2', diff --git a/tests/gold_tests/continuations/openclose.test.py b/tests/gold_tests/continuations/openclose.test.py index b75b95ebf30..471bdfba0f7 100644 --- a/tests/gold_tests/continuations/openclose.test.py +++ b/tests/gold_tests/continuations/openclose.test.py @@ -22,8 +22,8 @@ Test transactions and sessions, making sure they open and close in the proper order. ''' -# Define default ATS -ts = Test.MakeATSProcess("ts", command="traffic_manager") +# Define default ATS. Disable the cache to simplify the test. +ts = Test.MakeATSProcess("ts", command="traffic_manager", enable_cache=False) server = Test.MakeOriginServer("server") server2 = Test.MakeOriginServer("server2") @@ -43,7 +43,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 0, 'proxy.config.diags.debug.tags': 'ssntxnorder_verify.*', - 'proxy.config.http.cache.http': 0, # disable cache to simply the test. 'proxy.config.cache.enable_read_while_writer': 0 }) @@ -66,7 +65,7 @@ # Execution order is: ts/server, ps(curl cmds), Default Process. tr.Processes.Default.StartBefore( server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) ts.StartAfter(*ps) server.StartAfter(*ps) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/continuations/openclose_h2.test.py b/tests/gold_tests/continuations/openclose_h2.test.py index 6f07ce97a8e..6f3e73a2eed 100644 --- a/tests/gold_tests/continuations/openclose_h2.test.py +++ b/tests/gold_tests/continuations/openclose_h2.test.py @@ -26,8 +26,8 @@ Condition.HasCurlFeature('http2') ) -# Define default ATS -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, command="traffic_manager") +# Define default ATS. Disable the cache to simplify the test. +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, command="traffic_manager", enable_cache=False) server = Test.MakeOriginServer("server") server2 = Test.MakeOriginServer("server2") @@ -52,7 +52,6 @@ 'proxy.config.http2.zombie_debug_timeout_in': 10, 'proxy.config.diags.debug.enabled': 0, 'proxy.config.diags.debug.tags': 'ssntxnorder_verify', - 'proxy.config.http.cache.http': 0, # disable cache to simply the test. 'proxy.config.cache.enable_read_while_writer': 0, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), @@ -80,7 +79,7 @@ # Execution order is: ts/server, ps(curl cmds), Default Process. tr.Processes.Default.StartBefore( server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) # Don't know why we need both the start before and the start after ts.StartAfter(*ps) server.StartAfter(*ps) diff --git a/tests/gold_tests/continuations/session_id.test.py b/tests/gold_tests/continuations/session_id.test.py index b5e1d3a9b1e..5fd5ae132dd 100644 --- a/tests/gold_tests/continuations/session_id.test.py +++ b/tests/gold_tests/continuations/session_id.test.py @@ -33,8 +33,8 @@ "timestamp": "1469733493.993", "body": ""} server.addResponse("sessionfile.log", request_header, response_header) -# Configure ATS. -ts = Test.MakeATSProcess("ts", command="traffic_manager", enable_tls=True) +# Configure ATS. Disable the cache to simplify the test. +ts = Test.MakeATSProcess("ts", command="traffic_manager", enable_tls=True, enable_cache=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") @@ -44,7 +44,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'session_id_verify', - 'proxy.config.http.cache.http': 0, # disable cache to simplify the test. 'proxy.config.cache.enable_read_while_writer': 0, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), @@ -73,7 +72,7 @@ tr.Processes.Default.ReturnCode = Any(0, 2) tr.Processes.Default.StartBefore( server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) ts.StartAfter(*ps) server.StartAfter(*ps) diff --git a/tests/gold_tests/h2/h2enable.test.py b/tests/gold_tests/h2/h2enable.test.py index efcaf345fab..2a36f48421b 100644 --- a/tests/gold_tests/h2/h2enable.test.py +++ b/tests/gold_tests/h2/h2enable.test.py @@ -68,7 +68,7 @@ ts.Variables.ssl_port) tr.ReturnCode = 0 tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = server tr.StillRunningAfter = ts tr.Processes.Default.TimeOut = 5 diff --git a/tests/gold_tests/h2/h2enable_no_accept_threads.test.py b/tests/gold_tests/h2/h2enable_no_accept_threads.test.py index ec8f82b2a4b..10e42ba1f32 100644 --- a/tests/gold_tests/h2/h2enable_no_accept_threads.test.py +++ b/tests/gold_tests/h2/h2enable_no_accept_threads.test.py @@ -67,7 +67,7 @@ tr.Processes.Default.Command = "curl -v -k --resolve 'foo.com:{0}:127.0.0.1' https://foo.com:{0}".format(ts.Variables.ssl_port) tr.ReturnCode = 0 tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = server tr.StillRunningAfter = ts tr.Processes.Default.TimeOut = 5 diff --git a/tests/gold_tests/h2/h2spec.test.py b/tests/gold_tests/h2/h2spec.test.py index 5c9e3d6da29..76ccba6bc7e 100644 --- a/tests/gold_tests/h2/h2spec.test.py +++ b/tests/gold_tests/h2/h2spec.test.py @@ -32,9 +32,9 @@ httpbin = Test.MakeHttpBinServer("httpbin") # ---- -# Setup ATS +# Setup ATS. Disable the cache to simplify the test. # ---- -ts = Test.MakeATSProcess("ts", enable_tls=True) +ts = Test.MakeATSProcess("ts", enable_tls=True, enable_cache=False) # add ssl materials like key, certificates for the server ts.addSSLfile("ssl/server.pem") @@ -49,7 +49,6 @@ ts.Disk.records_config.update({ 'proxy.config.http.insert_request_via_str': 1, 'proxy.config.http.insert_response_via_str': 1, - 'proxy.config.http.cache.http': 0, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.client.verify.server': 0, @@ -68,7 +67,7 @@ test_run.Processes.Default.Command = 'h2spec {0} -t -k -p {1}'.format(h2spec_targets, ts.Variables.ssl_port) test_run.Processes.Default.ReturnCode = 0 test_run.Processes.Default.StartBefore(httpbin, ready=When.PortOpen(httpbin.Variables.Port)) -test_run.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +test_run.Processes.Default.StartBefore(Test.Processes.ts) test_run.Processes.Default.Streams.stdout = "gold/h2spec_stdout.gold" test_run.StillRunningAfter = httpbin diff --git a/tests/gold_tests/h2/http2.test.py b/tests/gold_tests/h2/http2.test.py index 2ee5ce53e38..7c8bacfdb9b 100644 --- a/tests/gold_tests/h2/http2.test.py +++ b/tests/gold_tests/h2/http2.test.py @@ -77,7 +77,7 @@ # ---- # Setup ATS # ---- -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) # add ssl materials like key, certificates for the server ts.addSSLfile("ssl/server.pem") @@ -100,7 +100,6 @@ 'proxy.config.diags.debug.tags': 'http', 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), - 'proxy.config.http.cache.http': 0, 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2', 'proxy.config.http2.active_timeout_in': 3, @@ -120,7 +119,6 @@ tr = Test.AddTestRun() tr.Processes.Default.Command = 'python3 h2client.py -p {0}'.format(ts.Variables.ssl_port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.stdout = "gold/remap-200.gold" diff --git a/tests/gold_tests/h2/http2_priority.test.py b/tests/gold_tests/h2/http2_priority.test.py index d3f5581e578..1c5b7cdffb8 100644 --- a/tests/gold_tests/h2/http2_priority.test.py +++ b/tests/gold_tests/h2/http2_priority.test.py @@ -39,7 +39,7 @@ # ---- # Setup ATS # ---- -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") @@ -51,7 +51,6 @@ 'dest_ip=* ssl_cert_name=server.pem ssl_key_name=server.key' ) ts.Disk.records_config.update({ - 'proxy.config.http.cache.http': 0, 'proxy.config.http2.stream_priority_enabled': 1, 'proxy.config.http2.no_activity_timeout_in': 3, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), diff --git a/tests/gold_tests/h2/httpbin.test.py b/tests/gold_tests/h2/httpbin.test.py index 274dcd6963c..afa85a62931 100644 --- a/tests/gold_tests/h2/httpbin.test.py +++ b/tests/gold_tests/h2/httpbin.test.py @@ -39,7 +39,7 @@ # ---- # Setup ATS # ---- -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) # add ssl materials like key, certificates for the server ts.addSSLfile("ssl/server.pem") @@ -54,7 +54,6 @@ ts.Disk.records_config.update({ 'proxy.config.http.insert_request_via_str': 1, 'proxy.config.http.insert_response_via_str': 1, - 'proxy.config.http.cache.http': 0, 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.client.verify.server': 0, diff --git a/tests/gold_tests/h2/nghttp.test.py b/tests/gold_tests/h2/nghttp.test.py index f0f6e182a3d..e4a35d5416d 100644 --- a/tests/gold_tests/h2/nghttp.test.py +++ b/tests/gold_tests/h2/nghttp.test.py @@ -46,7 +46,7 @@ # ---- # Setup ATS # ---- -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) # add ssl materials like key, certificates for the server ts.addSSLfile("ssl/server.pem") @@ -65,7 +65,6 @@ 'proxy.config.diags.debug.tags': 'http', 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), - 'proxy.config.http.cache.http': 0, 'proxy.config.http2.active_timeout_in': 3, }) @@ -79,6 +78,6 @@ ts.Variables.ssl_port) tr.Processes.Default.ReturnCode = 0 tr.Processes.Default.StartBefore(microserver, ready=When.PortOpen(microserver.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.stdout = "gold/nghttp_0_stdout.gold" tr.StillRunningAfter = microserver diff --git a/tests/gold_tests/headers/cache_and_req_body.test.py b/tests/gold_tests/headers/cache_and_req_body.test.py index f42ec57e42e..e820ca3a4e1 100644 --- a/tests/gold_tests/headers/cache_and_req_body.test.py +++ b/tests/gold_tests/headers/cache_and_req_body.test.py @@ -39,8 +39,6 @@ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http', 'proxy.config.http.response_via_str': 3, - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, }) ts.Disk.remap_config.AddLine( @@ -89,7 +87,7 @@ # Test 1 - 200 response and cache fill tr = Test.AddTestRun() tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(ts) tr.Processes.Default.Command = 'curl -s -D - -v --ipv4 --http1.1 -H "x-debug: x-cache,x-cache-key,via" -H "Host: www.example.com" http://localhost:{port}/'.format(port=ts.Variables.port) tr.Processes.Default.ReturnCode = 0 tr.Processes.Default.Streams.stdout = Testers.CurlHeader(cache_and_req_body_miss) diff --git a/tests/gold_tests/headers/cachedIMSRange.test.py b/tests/gold_tests/headers/cachedIMSRange.test.py index 4751f0f60d7..eb24a2b63b3 100644 --- a/tests/gold_tests/headers/cachedIMSRange.test.py +++ b/tests/gold_tests/headers/cachedIMSRange.test.py @@ -63,8 +63,6 @@ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http', 'proxy.config.http.response_via_str': 3, - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, }) ts.Disk.remap_config.AddLine( @@ -74,7 +72,7 @@ # Test 0 - Fill a 3 byte object with Last-Modified time into cache. tr = Test.AddTestRun() tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(ts) tr.Processes.Default.Command = 'curl -s -D - -v --ipv4 --http1.1 -H"UID: Fill" -H "x-debug: x-cache,x-cache-key,via" -H "Host: www.example.com" http://localhost:{0}/'.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 tr.Processes.Default.Streams.stdout = "cache_and_req_body-miss.gold" diff --git a/tests/gold_tests/headers/forwarded.test.py b/tests/gold_tests/headers/forwarded.test.py index d2d034789cd..97d559b9c57 100644 --- a/tests/gold_tests/headers/forwarded.test.py +++ b/tests/gold_tests/headers/forwarded.test.py @@ -85,7 +85,6 @@ def baselineTsSetup(ts): ts.Disk.records_config.update({ # 'proxy.config.diags.debug.enabled': 1, 'proxy.config.url_remap.pristine_host_hdr': 1, # Retain Host header in original incoming client request. - 'proxy.config.http.cache.http': 0, # Make sure each request is forwarded to the origin server. 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir) @@ -100,7 +99,9 @@ def baselineTsSetup(ts): ) -ts = Test.MakeATSProcess("ts", enable_tls=True) +# Disable the cache to make sure each request is forwarded to the origin +# server. +ts = Test.MakeATSProcess("ts", enable_tls=True, enable_cache=False) baselineTsSetup(ts) @@ -154,7 +155,7 @@ def baselineTsSetup(ts): # Wait for the micro server tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) # Delay on readiness of our ssl ports -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) # tr.Processes.Default.Command = ( 'curl --verbose --ipv4 --http1.1 --proxy localhost:{} http://www.no-oride.com'.format(ts.Variables.port) @@ -207,7 +208,7 @@ def TestHttp1_1(host): # Forwarded header with UUID of 2nd ATS. tr = Test.AddTestRun() # Delay on readiness of our ssl ports -tr.Processes.Default.StartBefore(Test.Processes.ts2, ready=When.PortOpen(ts2.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts2) # tr.Processes.Default.Command = ( 'curl --verbose --ipv4 --http1.1 --proxy localhost:{} http://www.no-oride.com'.format(ts2.Variables.port) diff --git a/tests/gold_tests/headers/normalize_ae.test.py b/tests/gold_tests/headers/normalize_ae.test.py index d9779a2d49a..6da051926b8 100644 --- a/tests/gold_tests/headers/normalize_ae.test.py +++ b/tests/gold_tests/headers/normalize_ae.test.py @@ -43,15 +43,15 @@ request_header = {"headers": "GET / HTTP/1.1\r\nHost: www.ae-2.com\r\n\r\n", "timestamp": "1469733493.993", "body": ""} server.addResponse("sessionlog.json", request_header, response_header) -# Define first ATS -ts = Test.MakeATSProcess("ts", select_ports=True) +# Define first ATS. Disable the cache to make sure each request is sent to the +# origin server. +ts = Test.MakeATSProcess("ts", select_ports=True, enable_cache=False) def baselineTsSetup(ts): ts.Disk.records_config.update({ # 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.http.cache.http': 0, # Make sure each request is sent to the origin server. }) ts.Disk.remap_config.AddLine( diff --git a/tests/gold_tests/headers/syntax.test.py b/tests/gold_tests/headers/syntax.test.py index 0fc79dbea8f..e2170a086f0 100644 --- a/tests/gold_tests/headers/syntax.test.py +++ b/tests/gold_tests/headers/syntax.test.py @@ -40,7 +40,7 @@ # Test 0 - 200 Response tr = Test.AddTestRun() tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Command = 'curl -s -D - -v --ipv4 --http1.1 -H " foo: bar" -H "Host: www.example.com" http://localhost:{0}/'.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 tr.Processes.Default.Streams.stdout = "syntax.200.gold" diff --git a/tests/gold_tests/headers/via.test.py b/tests/gold_tests/headers/via.test.py index 274640254bd..b6ce198363e 100644 --- a/tests/gold_tests/headers/via.test.py +++ b/tests/gold_tests/headers/via.test.py @@ -72,7 +72,7 @@ # Wait for the micro server tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) # Delay on readiness of our ssl ports -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Command = 'curl --verbose --ipv4 --http1.1 --proxy localhost:{} http://www.example.com'.format( ts.Variables.port) diff --git a/tests/gold_tests/ip_allow/ip_allow.test.py b/tests/gold_tests/ip_allow/ip_allow.test.py index 5e4b5d69185..39a12ed88ec 100644 --- a/tests/gold_tests/ip_allow/ip_allow.test.py +++ b/tests/gold_tests/ip_allow/ip_allow.test.py @@ -24,7 +24,8 @@ Test.ContinueOnFail = True # Define default ATS -ts = Test.MakeATSProcess("ts", command="traffic_manager", select_ports=True, enable_tls=True) +ts = Test.MakeATSProcess("ts", command="traffic_manager", select_ports=True, + enable_tls=True, enable_cache=False) server = Test.MakeOriginServer("server", ssl=True) testName = "" @@ -89,7 +90,6 @@ 'proxy.config.http.connect_ports': '{0}'.format(server.Variables.SSL_Port), 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), - 'proxy.config.http.cache.http': 0, 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2', 'proxy.config.http2.active_timeout_in': 3, @@ -145,7 +145,7 @@ # tr = Test.AddTestRun() tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.SSL_Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Command = ('curl --verbose -H "Host: www.example.com" http://localhost:{ts_port}/get'. format(ts_port=ts.Variables.port)) diff --git a/tests/gold_tests/logging/all_headers.test.py b/tests/gold_tests/logging/all_headers.test.py index 7e0f47e2696..065fbacc3f5 100644 --- a/tests/gold_tests/logging/all_headers.test.py +++ b/tests/gold_tests/logging/all_headers.test.py @@ -36,9 +36,6 @@ server.addResponse("sessionlog.json", request_header, response_header) ts.Disk.records_config.update({ - # Do not accept connections from clients until cache subsystem is operational. - 'proxy.config.http.wait_for_cache': 1, - 'proxy.config.diags.debug.enabled': 0, 'proxy.config.diags.debug.tags': 'http|dns', }) diff --git a/tests/gold_tests/logging/custom-log.test.py b/tests/gold_tests/logging/custom-log.test.py index 54b9c1d8705..9318dd78f0a 100644 --- a/tests/gold_tests/logging/custom-log.test.py +++ b/tests/gold_tests/logging/custom-log.test.py @@ -59,7 +59,6 @@ tr.Processes.Default.Command = 'curl "http://127.0.0.1:{0}" --verbose'.format( ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(Test.Processes.ts) tr = Test.AddTestRun() diff --git a/tests/gold_tests/logging/log-field.test.py b/tests/gold_tests/logging/log-field.test.py index 96a0f654723..35deb3497c2 100644 --- a/tests/gold_tests/logging/log-field.test.py +++ b/tests/gold_tests/logging/log-field.test.py @@ -22,7 +22,7 @@ Test log fields. ''' -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) server = Test.MakeOriginServer("server") request_header = {'timestamp': 100, "headers": "GET /test-1 HTTP/1.1\r\nHost: test-1\r\n\r\n", "body": ""} @@ -40,7 +40,6 @@ ts.Disk.records_config.update({ 'proxy.config.net.connections_throttle': 100, - 'proxy.config.http.cache.http': 0 }) # setup some config file for this server ts.Disk.remap_config.AddLine( diff --git a/tests/gold_tests/logging/log-filter.test.py b/tests/gold_tests/logging/log-filter.test.py index a24842563bd..082be0afdab 100644 --- a/tests/gold_tests/logging/log-filter.test.py +++ b/tests/gold_tests/logging/log-filter.test.py @@ -22,7 +22,7 @@ Test log filter. ''' -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) server = Test.MakeOriginServer("server") request_header = {'timestamp': 100, "headers": "GET /test-1 HTTP/1.1\r\nHost: test-1\r\n\r\n", "body": ""} @@ -48,7 +48,6 @@ ts.Disk.records_config.update({ 'proxy.config.net.connections_throttle': 100, - 'proxy.config.http.cache.http': 0 }) # setup some config file for this server ts.Disk.remap_config.AddLine( diff --git a/tests/gold_tests/logging/log_retention.test.py b/tests/gold_tests/logging/log_retention.test.py index a0391c51af4..d9763190e6a 100644 --- a/tests/gold_tests/logging/log_retention.test.py +++ b/tests/gold_tests/logging/log_retention.test.py @@ -33,7 +33,6 @@ class TestLogRetention: __base_records_config = { # Do not accept connections from clients until cache subsystem is operational. - 'proxy.config.http.wait_for_cache': 1, 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'logspace', diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py index a62c3f31844..2b7ffba3b06 100644 --- a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py +++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py @@ -227,8 +227,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'cache_range_requests', - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, }) curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{} -H "x-debug: x-cache"'.format(ts.Variables.port) @@ -237,7 +235,7 @@ tr = Test.AddTestRun("full asset cache miss bypass") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://www.example.com/path -H "uuid: full"' ps.ReturnCode = 0 ps.Streams.stderr = "gold/full.stderr.gold" diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py index bee7363c23b..988c7e1c4a1 100644 --- a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py +++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py @@ -159,8 +159,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'cache_range_requests', - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, }) curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{} -H "x-debug: x-cache"'.format(ts.Variables.port) @@ -169,7 +167,7 @@ tr = Test.AddTestRun("full asset fetch") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://www.example.com/path -H "uuid: full"' ps.ReturnCode = 0 ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss for load") diff --git a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py index 3d019db2f70..ecf3a6c9395 100644 --- a/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py +++ b/tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py @@ -100,8 +100,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'cache_range_requests', - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, }) curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{} -H "x-debug: x-cache"'.format(ts.Variables.port) @@ -110,7 +108,7 @@ tr = Test.AddTestRun("0- range cache load") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://www.example.com/path -r 0-' ps.ReturnCode = 0 ps.Streams.stdout.Content = Testers.ContainsExpression("X-Cache: miss", "expected cache miss for load") diff --git a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py index 54908b9efe2..3eefe7dca2b 100644 --- a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py +++ b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py @@ -78,7 +78,7 @@ # curl should see that Traffic Server presents bar.com cert from alice tr = Test.AddTestRun("Server-Cert-Pre") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Command = ( 'curl --verbose --insecure --ipv4 --resolve bar.com:{0}:127.0.0.1 https://bar.com:{0}'.format(ts.Variables.ssl_port) ) diff --git a/tests/gold_tests/pluginTest/combo_handler/combo_handler.test.py b/tests/gold_tests/pluginTest/combo_handler/combo_handler.test.py index c7b098001fc..e1c5cc0ea53 100644 --- a/tests/gold_tests/pluginTest/combo_handler/combo_handler.test.py +++ b/tests/gold_tests/pluginTest/combo_handler/combo_handler.test.py @@ -103,8 +103,8 @@ def add_server_obj(content_type, path): ts.Disk.ctwl_cfg.AddLine("text/css") tr = Test.AddTestRun() -tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) -tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) +tr.Processes.Default.StartBefore(ts) +tr.Processes.Default.StartBefore(server) tr.Processes.Default.Command = "echo start stuff" tr.Processes.Default.ReturnCode = 0 diff --git a/tests/gold_tests/pluginTest/compress/compress.test.py b/tests/gold_tests/pluginTest/compress/compress.test.py index f93ce3d05bf..afce8ad9bc2 100644 --- a/tests/gold_tests/pluginTest/compress/compress.test.py +++ b/tests/gold_tests/pluginTest/compress/compress.test.py @@ -73,10 +73,9 @@ def curl(ts, idx, encodingList): waitForTs = True -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) ts.Disk.records_config.update({ - 'proxy.config.http.cache.http': 0, 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'compress', 'proxy.config.http.normalize_ae': 0, @@ -101,7 +100,7 @@ def curl(ts, idx, encodingList): tr = Test.AddTestRun() if (waitForTs): - tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) + tr.Processes.Default.StartBefore(ts) waitForTs = False if (waitForServer): tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) diff --git a/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py index 25254ec49ab..efeffb72f21 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py @@ -77,7 +77,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py index e1df4fea8fe..e6c61748398 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py @@ -66,7 +66,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py index 4d595a41529..1a2307400a4 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py @@ -77,7 +77,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py index 6c592e820dc..677eab97a2a 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py @@ -77,7 +77,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py index c238b259e3a..bb53f097a1f 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py @@ -77,7 +77,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py b/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py index 53c894c4966..7376a405835 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py @@ -76,7 +76,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py index 1da71a683eb..9a0cfe77bc8 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py @@ -94,7 +94,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py index 45199372202..5ef8987ac9a 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py @@ -76,7 +76,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py index 27998dfd2b8..420ecda1c0f 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py @@ -77,7 +77,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py index 9a636d75cbd..2ff4276cbea 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py @@ -80,7 +80,6 @@ #--verbose #'''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py b/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py index 5bb358b40fd..2f5bf3aae97 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py @@ -73,7 +73,6 @@ --verbose \ '''.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/pluginTest/header_rewrite/header_rewrite.test.py b/tests/gold_tests/pluginTest/header_rewrite/header_rewrite.test.py index 6e850eb8573..923b8f1f3eb 100644 --- a/tests/gold_tests/pluginTest/header_rewrite/header_rewrite.test.py +++ b/tests/gold_tests/pluginTest/header_rewrite/header_rewrite.test.py @@ -53,7 +53,6 @@ tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} "http://www.example.com" -H "Proxy-Connection: keep-alive" --verbose'.format( ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.stderr = "gold/header_rewrite-303.gold" diff --git a/tests/gold_tests/pluginTest/lua/lua_states_stats.test.py b/tests/gold_tests/pluginTest/lua/lua_states_stats.test.py index abd3a162a9b..cef8e066768 100644 --- a/tests/gold_tests/pluginTest/lua/lua_states_stats.test.py +++ b/tests/gold_tests/pluginTest/lua/lua_states_stats.test.py @@ -52,7 +52,7 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'ts_lua', - 'proxy.config.plugin.lua.max_states': 4, + 'proxy.config.plugin.lua.max_states': 4, }) curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{} '.format(ts.Variables.port) @@ -61,7 +61,7 @@ tr = Test.AddTestRun("Lua states") ps = tr.Processes.Default # alias ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = "traffic_ctl config match lua" ps.Env = ts.Env ps.ReturnCode = 0 diff --git a/tests/gold_tests/pluginTest/lua/lua_watermark.test.py b/tests/gold_tests/pluginTest/lua/lua_watermark.test.py index c3565a10612..cff259ba020 100644 --- a/tests/gold_tests/pluginTest/lua/lua_watermark.test.py +++ b/tests/gold_tests/pluginTest/lua/lua_watermark.test.py @@ -58,8 +58,8 @@ # Test if watermark upstream is set tr = Test.AddTestRun("Lua Watermark") -tr.Processes.Default.Command = "curl http://127.0.0.1:{0}".format(ts.Variables.port) +tr.Processes.Default.Command = "curl -v http://127.0.0.1:{0}".format(ts.Variables.port) tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -tr.Processes.Default.StartBefore(Test.Processes.ts) -tr.StillRunningAfter = server +tr.Processes.Default.StartBefore(ts) +tr.StillRunningAfter = server diff --git a/tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py b/tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py index 456dd8dea02..9e7469284bd 100644 --- a/tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py +++ b/tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py @@ -46,7 +46,7 @@ replay_txns = replay["sessions"][0]["transactions"] # Define ATS and configure -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) testName = "regex_remap" @@ -68,7 +68,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http|regex_remap', - 'proxy.config.http.cache.http': 0, }) # 0 Test - Load cache (miss) (path1) diff --git a/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py b/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py index f4b79590e02..ecb60b394a4 100644 --- a/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py +++ b/tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py @@ -149,8 +149,6 @@ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'regex_revalidate', # 'proxy.config.diags.debug.enabled': 0, - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, 'proxy.config.http.insert_age_in_response': 0, 'proxy.config.http.response_via_str': 3, }) diff --git a/tests/gold_tests/pluginTest/slice/slice.test.py b/tests/gold_tests/pluginTest/slice/slice.test.py index fa4c2031bd8..6dfd50fa3aa 100644 --- a/tests/gold_tests/pluginTest/slice/slice.test.py +++ b/tests/gold_tests/pluginTest/slice/slice.test.py @@ -87,19 +87,16 @@ ' @plugin=slice.so @pparam=--blockbytes-test={}'.format(block_bytes) ]) -# minimal configuration -ts.Disk.records_config.update({ -# 'proxy.config.diags.debug.enabled': 1, -# 'proxy.config.diags.debug.tags': 'slice', - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, -}) +# ts.Disk.records_config.update({ +# 'proxy.config.diags.debug.enabled': 1, +# 'proxy.config.diags.debug.tags': 'slice', +# }) # 0 Test - Prefetch entire asset into cache tr = Test.AddTestRun("Fetch first slice range") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://preload/path' ps.ReturnCode = 0 ps.Streams.stderr = "gold/slice_200.stderr.gold" diff --git a/tests/gold_tests/pluginTest/slice/slice_error.test.py b/tests/gold_tests/pluginTest/slice/slice_error.test.py index 8b0f841fa57..459a3237e4e 100644 --- a/tests/gold_tests/pluginTest/slice/slice_error.test.py +++ b/tests/gold_tests/pluginTest/slice/slice_error.test.py @@ -34,7 +34,7 @@ server = Test.MakeOriginServer("server", lookup_key="{%Range}{PATH}") # Define ATS and configure -ts = Test.MakeATSProcess("ts", command="traffic_server") +ts = Test.MakeATSProcess("ts", command="traffic_server", enable_cache=False) body = "the quick brown fox" # len 19 @@ -294,8 +294,6 @@ ts.Disk.records_config.update({ # 'proxy.config.diags.debug.enabled': 1, # 'proxy.config.diags.debug.tags': 'slice', - 'proxy.config.http.cache.http': 0, - 'proxy.config.http.wait_for_cache': 0, }) # Override builtin error check as these cases will fail @@ -309,7 +307,7 @@ tr = Test.AddTestRun("Etag test") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://ats/etag' #ps.ReturnCode = 0 # curl will return fail status ps.Streams.stdout.Content = Testers.ContainsExpression("200 OK", "expected 200 OK response") diff --git a/tests/gold_tests/pluginTest/slice/slice_regex.test.py b/tests/gold_tests/pluginTest/slice/slice_regex.test.py index 6ca86a8196f..230f42a36f1 100644 --- a/tests/gold_tests/pluginTest/slice/slice_regex.test.py +++ b/tests/gold_tests/pluginTest/slice/slice_regex.test.py @@ -33,8 +33,8 @@ # configure origin server server = Test.MakeOriginServer("server") -# Define ATS and configure -ts = Test.MakeATSProcess("ts", command="traffic_server") +# Define ATS and configure. +ts = Test.MakeATSProcess("ts", command="traffic_server", enable_cache=False) # default root request_header_chk = {"headers": @@ -126,8 +126,6 @@ ts.Disk.records_config.update({ # 'proxy.config.diags.debug.enabled': 1, # 'proxy.config.diags.debug.tags': 'slice', - 'proxy.config.http.cache.http': 0, - 'proxy.config.http.wait_for_cache': 0, 'proxy.config.http.insert_age_in_response': 0, 'proxy.config.http.response_via_str': 0, }) @@ -136,7 +134,7 @@ tr = Test.AddTestRun("Exclude - asset passed through") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://exclude/slice.txt' ps.ReturnCode = 0 ps.Streams.stdout.Content = Testers.ContainsExpression("X-Info: notsliced", "expected not sliced header") diff --git a/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py b/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py index c4583ef28f9..61b28c7fcb3 100644 --- a/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py +++ b/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py @@ -68,13 +68,10 @@ ts.Disk.plugin_config.AddLine('xdebug.so') -# minimal configuration -ts.Disk.records_config.update({ - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, -# 'proxy.config.diags.debug.enabled': 1, -# 'proxy.config.diags.debug.tags': 'cache_range_requests|slice', -}) +# ts.Disk.records_config.update({ +# 'proxy.config.diags.debug.enabled': 1, +# 'proxy.config.diags.debug.tags': 'cache_range_requests|slice', +# }) curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{}'.format(ts.Variables.port) + ' -H "x-debug: x-cache"' @@ -156,7 +153,7 @@ tr = Test.AddTestRun("Preload reference etagnew-0") ps = tr.Processes.Default ps.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -ps.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +ps.StartBefore(Test.Processes.ts) ps.Command = curl_and_args + ' http://cache_range_requests/second -r 0-2 -H "uuid: etagnew-0"' ps.ReturnCode = 0 ps.Streams.stderr = "gold/bbb.gold" diff --git a/tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py b/tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py index 456ee94dc49..97e474c8d38 100644 --- a/tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py +++ b/tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py @@ -34,7 +34,9 @@ response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": ""} server.addResponse("sessionlog.json", request_header, response_header) -ts = Test.MakeATSProcess("ts", enable_tls=True) +# Disable the cache to make sure each request is forwarded to the origin +# server. +ts = Test.MakeATSProcess("ts", enable_tls=True, enable_cache=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") @@ -43,7 +45,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 0, 'proxy.config.diags.debug.tags': 'http', - 'proxy.config.http.cache.http': 0, # Make sure each request is forwarded to the origin server. 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), diff --git a/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py b/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py index c5caaceed1e..c05997d7db3 100644 --- a/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py +++ b/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py @@ -27,12 +27,11 @@ response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": "" } server.addResponse("sessionlog.json", request_header, response_header) -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=False) +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=False, enable_cache=False) ts.Disk.records_config.update({ 'proxy.config.diags.debug.tags': 'test', 'proxy.config.diags.debug.enabled': 1, - 'proxy.config.http.cache.http': 0, 'proxy.config.url_remap.remap_required': 0, }) @@ -45,8 +44,7 @@ tr = Test.AddTestRun() # Probe server port to check if ready. tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -# Probe TS cleartext port to check if ready (probing TLS port causes spurious VCONN hook triggers). -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) # tr.Processes.Default.Command = ( 'curl --verbose --ipv4 --header "Host: one" http://localhost:{0}/argh'.format(ts.Variables.port) diff --git a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py index 903e9fa7f9f..4993de06d29 100644 --- a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py +++ b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py @@ -33,13 +33,14 @@ response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": "" } server.addResponse("sessionlog.json", request_header, response_header) -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +# Disable the cache to make sure each request is forwarded to the origin +# server. +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") ts.Disk.records_config.update({ - 'proxy.config.http.cache.http': 0, # Make sure each request is forwarded to the origin server. 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), @@ -64,8 +65,7 @@ tr = Test.AddTestRun() # Probe server port to check if ready. tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -# Probe TS cleartext port to check if ready (probing TLS port causes spurious VCONN hook triggers). -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) # tr.Processes.Default.Command = ( 'curl --verbose --ipv4 --header "Host: one" http://localhost:{0}/argh'.format(ts.Variables.port) diff --git a/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py b/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py index 7ba42f2384c..dc8ae25e0b5 100644 --- a/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py +++ b/tests/gold_tests/pluginTest/traffic_dump/traffic_dump.test.py @@ -89,8 +89,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'traffic_dump', - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, 'proxy.config.http.insert_age_in_response': 0, }) ts.Disk.remap_config.AddLine( diff --git a/tests/gold_tests/pluginTest/tsapi/tsapi.test.py b/tests/gold_tests/pluginTest/tsapi/tsapi.test.py index 65d07118eac..0295ac43156 100644 --- a/tests/gold_tests/pluginTest/tsapi/tsapi.test.py +++ b/tests/gold_tests/pluginTest/tsapi/tsapi.test.py @@ -33,13 +33,14 @@ response_header = {"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": "112233" } server.addResponse("sessionlog.json", request_header, response_header) -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +# Disable the cache to make sure each request is forwarded to the origin +# server. +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") ts.Disk.records_config.update({ - 'proxy.config.http.cache.http': 0, # Make sure each request is forwarded to the origin server. 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), @@ -64,8 +65,7 @@ tr = Test.AddTestRun() # Probe server port to check if ready. tr.Processes.Default.StartBefore(server, ready=When.PortOpen(server.Variables.Port)) -# Probe TS cleartext port to check if ready. -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) # tr.Processes.Default.Command = ( 'curl --verbose --ipv4 --header "Host: mYhOsT.teSt:{0}" hTtP://loCalhOst:{1}/'.format(server.Variables.Port, ts.Variables.port) diff --git a/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py b/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py index 010a8f1fab3..cff83381a8c 100644 --- a/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py +++ b/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py @@ -71,14 +71,13 @@ # http://user:password@host:port/path;params?query#fragment # Define default ATS -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) #ts = Test.MakeATSProcess("ts", "traffic_server_valgrind.sh") ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'uri_signing|http', # 'proxy.config.diags.debug.tags': 'uri_signing', - 'proxy.config.http.cache.http': 0, # No cache }) # Use unchanged incoming URL. diff --git a/tests/gold_tests/pluginTest/url_sig/url_sig.test.py b/tests/gold_tests/pluginTest/url_sig/url_sig.test.py index 588f6d6b60a..aee7d1c1697 100644 --- a/tests/gold_tests/pluginTest/url_sig/url_sig.test.py +++ b/tests/gold_tests/pluginTest/url_sig/url_sig.test.py @@ -43,8 +43,9 @@ # add response to the server dictionary server.addResponse("sessionfile.log", request_header, response_header) -# Define default ATS -ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True) +# Define default ATS. Disable the cache to make sure each request is forwarded +# to the origin server. +ts = Test.MakeATSProcess("ts", select_ports=True, enable_tls=True, enable_cache=False) ts.addSSLfile("../../remap/ssl/server.pem") ts.addSSLfile("../../remap/ssl/server.key") @@ -53,7 +54,6 @@ ts.Disk.records_config.update({ # 'proxy.config.diags.debug.enabled': 1, # 'proxy.config.diags.debug.tags': 'http|url_sig', - 'proxy.config.http.cache.http': 0, # Make sure each request is forwarded to the origin server. 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), diff --git a/tests/gold_tests/post_slow_server/post_slow_server.test.py b/tests/gold_tests/post_slow_server/post_slow_server.test.py index 9ec085602e4..fa0e6214ee8 100644 --- a/tests/gold_tests/post_slow_server/post_slow_server.test.py +++ b/tests/gold_tests/post_slow_server/post_slow_server.test.py @@ -28,7 +28,7 @@ Condition.HasCurlFeature('http2') ) -ts = Test.MakeATSProcess("ts", enable_tls=True) +ts = Test.MakeATSProcess("ts", enable_tls=True, enable_cache=False) ts.addSSLfile("ssl/server.pem") ts.addSSLfile("ssl/server.key") @@ -36,7 +36,6 @@ ts.Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http', - 'proxy.config.http.cache.http': 0, # disable caching. 'proxy.config.proxy_name': 'Poxy_Proxy', # This will be the server name. 'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir), 'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir), diff --git a/tests/gold_tests/redirect/redirect.test.py b/tests/gold_tests/redirect/redirect.test.py index 17ff76da6b8..b478c69ebb7 100644 --- a/tests/gold_tests/redirect/redirect.test.py +++ b/tests/gold_tests/redirect/redirect.test.py @@ -24,7 +24,7 @@ Test.ContinueOnFail = True -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) redirect_serv = Test.MakeOriginServer("re_server") dest_serv = Test.MakeOriginServer("dest_server") dns = Test.MakeDNServer("dns") @@ -33,7 +33,6 @@ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http|dns|redirect', 'proxy.config.http.number_of_redirections': 1, - 'proxy.config.http.cache.http': 0, 'proxy.config.dns.nameservers': '127.0.0.1:{0}'.format(dns.Variables.Port), 'proxy.config.dns.resolv_conf': 'NULL', 'proxy.config.url_remap.remap_required': 0, # need this so the domain gets a chance to be evaluated through DNS diff --git a/tests/gold_tests/redirect/redirect_actions.test.py b/tests/gold_tests/redirect/redirect_actions.test.py index 6603c27b544..509d27f61a7 100644 --- a/tests/gold_tests/redirect/redirect_actions.test.py +++ b/tests/gold_tests/redirect/redirect_actions.test.py @@ -107,12 +107,11 @@ def makeTestCase(redirectTarget, expectedAction, scenario): tr.Processes.Default.StartBefore(dns) if config not in trafficservers: - trafficservers[config] = Test.MakeATSProcess('ts_{0}'.format(normConfig)) + trafficservers[config] = Test.MakeATSProcess('ts_{0}'.format(normConfig), enable_cache=False) trafficservers[config].Disk.records_config.update({ 'proxy.config.diags.debug.enabled': 1, 'proxy.config.diags.debug.tags': 'http|dns|redirect', 'proxy.config.http.number_of_redirections': 1, - 'proxy.config.http.cache.http': 0, 'proxy.config.dns.nameservers': '127.0.0.1:{0}'.format(dns.Variables.Port), 'proxy.config.dns.resolv_conf': 'NULL', 'proxy.config.url_remap.remap_required': 0, diff --git a/tests/gold_tests/redirect/redirect_post.test.py b/tests/gold_tests/redirect/redirect_post.test.py index ce5f5bfbf85..88ada624169 100644 --- a/tests/gold_tests/redirect/redirect_post.test.py +++ b/tests/gold_tests/redirect/redirect_post.test.py @@ -29,7 +29,7 @@ Test.ContinueOnFail = True -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) redirect_serv1 = Test.MakeOriginServer("re_server1") redirect_serv2 = Test.MakeOriginServer("re_server2") dest_serv = Test.MakeOriginServer("dest_server") @@ -37,7 +37,6 @@ ts.Disk.records_config.update({ 'proxy.config.http.number_of_redirections': MAX_REDIRECT, 'proxy.config.http.post_copy_size' : 919430601, - 'proxy.config.http.cache.http': 0, 'proxy.config.http.redirect.actions': 'self:follow', # redirects to self are not followed by default # 'proxy.config.diags.debug.enabled': 1, }) diff --git a/tests/gold_tests/remap/remap_http.test.py b/tests/gold_tests/remap/remap_http.test.py index cabcc02b2db..4959e530772 100644 --- a/tests/gold_tests/remap/remap_http.test.py +++ b/tests/gold_tests/remap/remap_http.test.py @@ -78,7 +78,6 @@ tr = Test.AddTestRun() tr.Processes.Default.Command = 'curl "http://127.0.0.1:{0}/" --verbose'.format(ts.Variables.port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(dns) tr.Processes.Default.StartBefore(Test.Processes.ts) diff --git a/tests/gold_tests/remap/remap_https.test.py b/tests/gold_tests/remap/remap_https.test.py index 0c8c92887bc..d15a1a2d243 100644 --- a/tests/gold_tests/remap/remap_https.test.py +++ b/tests/gold_tests/remap/remap_https.test.py @@ -71,11 +71,9 @@ tr.Processes.Default.Command = 'curl --http1.1 -k https://127.0.0.1:{0} --verbose'.format(ts.Variables.ssl_port) tr.Processes.Default.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(server2) -# Delay on readyness of our ssl ports -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.stderr = "gold/remap-hitATS-404.gold" tr.StillRunningAfter = server tr.StillRunningAfter = ts diff --git a/tests/gold_tests/timeout/active_timeout.test.py b/tests/gold_tests/timeout/active_timeout.test.py index b3b0e36f359..f56b5b65452 100644 --- a/tests/gold_tests/timeout/active_timeout.test.py +++ b/tests/gold_tests/timeout/active_timeout.test.py @@ -49,7 +49,7 @@ tr = Test.AddTestRun("tr") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(ts) tr.Processes.Default.Command = 'curl -i http://127.0.0.1:{0}/file'.format(ts.Variables.port) tr.Processes.Default.Streams.stdout = Testers.ContainsExpression("Activity Timeout", "Request should fail with active timeout") diff --git a/tests/gold_tests/timeout/inactive_timeout.test.py b/tests/gold_tests/timeout/inactive_timeout.test.py index 33e22e8a7e3..c727c32d92e 100644 --- a/tests/gold_tests/timeout/inactive_timeout.test.py +++ b/tests/gold_tests/timeout/inactive_timeout.test.py @@ -49,7 +49,7 @@ tr = Test.AddTestRun("tr") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(ts) tr.Processes.Default.Command = 'curl -i http://127.0.0.1:{0}/file'.format(ts.Variables.port) tr.Processes.Default.Streams.stdout = Testers.ContainsExpression("Inactivity Timeout", "Request should fail with inactivity timeout") diff --git a/tests/gold_tests/timeout/timeout.test.py b/tests/gold_tests/timeout/timeout.test.py index 29094d73f85..63c8ca3f8ec 100644 --- a/tests/gold_tests/timeout/timeout.test.py +++ b/tests/gold_tests/timeout/timeout.test.py @@ -36,7 +36,7 @@ tr = Test.AddTestRun("tr") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(ts) tr.Processes.Default.StartBefore(dns) tr.Processes.Default.Command = 'curl -i -x http://127.0.0.1:{0} http://127.0.0.1:{1}/file'.format(ts.Variables.port, server.Variables.Port) tr.Processes.Default.Streams.stdout = "timeout.gold" diff --git a/tests/gold_tests/tls/tls.test.py b/tests/gold_tests/tls/tls.test.py index d204445e6cc..185ca7a8dae 100644 --- a/tests/gold_tests/tls/tls.test.py +++ b/tests/gold_tests/tls/tls.test.py @@ -73,8 +73,7 @@ tr = Test.AddTestRun("Run-Test") tr.Command = './ssl-post 127.0.0.1 40 {0} {1}'.format(header_count, ts.Variables.ssl_port) tr.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.stdout = "gold/ssl-post.gold" tr.StillRunningAfter = server diff --git a/tests/gold_tests/tls/tls_0rtt_server.test.py b/tests/gold_tests/tls/tls_0rtt_server.test.py index e6163043fd6..256e0ae4195 100644 --- a/tests/gold_tests/tls/tls_0rtt_server.test.py +++ b/tests/gold_tests/tls/tls_0rtt_server.test.py @@ -133,7 +133,7 @@ tr.Processes.Default.Command = 'curl https://127.0.0.1:{0} -k'.format(ts.Variables.ssl_port) tr.Processes.Default.ReturnCode = 0 tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.Streams.All = Testers.ContainsExpression('curl test', 'Making sure the basics still work') tr.Processes.Default.Streams.All += Testers.ExcludesExpression('early data accepted', '') tr.StillRunningAfter = server diff --git a/tests/gold_tests/tls/tls_check_cert_selection.test.py b/tests/gold_tests/tls/tls_check_cert_selection.test.py index 0573375eb78..cbf79522f37 100644 --- a/tests/gold_tests/tls/tls_check_cert_selection.test.py +++ b/tests/gold_tests/tls/tls_check_cert_selection.test.py @@ -72,7 +72,7 @@ tr.ReturnCode = 0 tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(dns) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = server tr.StillRunningAfter = ts tr.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") diff --git a/tests/gold_tests/tls/tls_check_dual_cert_selection.test.py b/tests/gold_tests/tls/tls_check_dual_cert_selection.test.py index bc2682aec05..a8d6413e9f4 100644 --- a/tests/gold_tests/tls/tls_check_dual_cert_selection.test.py +++ b/tests/gold_tests/tls/tls_check_dual_cert_selection.test.py @@ -78,7 +78,7 @@ tr.ReturnCode = 0 tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(dns) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = server tr.StillRunningAfter = ts tr.Processes.Default.Streams.All += Testers.ContainsExpression("Peer signature type: ECDSA", "Should select EC cert") diff --git a/tests/gold_tests/tls/tls_client_cert2.test.py b/tests/gold_tests/tls/tls_client_cert2.test.py index 95f2fcede36..eeeda8bc76f 100644 --- a/tests/gold_tests/tls/tls_client_cert2.test.py +++ b/tests/gold_tests/tls/tls_client_cert2.test.py @@ -66,7 +66,7 @@ 'proxy.config.ssl.client.verify.server': 0, 'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2', 'proxy.config.exec_thread.autoconfig.scale': 1.0, - 'proxy.config.url_remap.pristine_host_hdr' : 1, + 'proxy.config.url_remap.pristine_host_hdr': 1, }) ts.Disk.ssl_multicert_config.AddLine( @@ -98,7 +98,7 @@ # Should succeed tr = Test.AddTestRun("bob.bar.com to server 1") -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(server2) tr.StillRunningAfter = ts diff --git a/tests/gold_tests/tls/tls_hooks_verify.test.py b/tests/gold_tests/tls/tls_hooks_verify.test.py index 33e1f15814b..5b89fd45d5f 100644 --- a/tests/gold_tests/tls/tls_hooks_verify.test.py +++ b/tests/gold_tests/tls/tls_hooks_verify.test.py @@ -69,7 +69,7 @@ tr = Test.AddTestRun("request good name") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts tr.StillRunningAfter = server tr.Processes.Default.Command = "curl --resolve \"foo.com:{0}:127.0.0.1\" -k https://foo.com:{0}".format(ts.Variables.ssl_port) diff --git a/tests/gold_tests/tls/tls_session_cache.test.py b/tests/gold_tests/tls/tls_session_cache.test.py index 0d4d0a98e9b..813508e6cc8 100644 --- a/tests/gold_tests/tls/tls_session_cache.test.py +++ b/tests/gold_tests/tls/tls_session_cache.test.py @@ -84,7 +84,6 @@ def checkSession(ev) : tr = Test.AddTestRun("OpenSSL s_client -reconnect") tr.Command = 'echo -e "GET / HTTP/1.0\r\n" | openssl s_client -tls1_2 -connect 127.0.0.1:{0} -reconnect'.format(ts.Variables.ssl_port) tr.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(Test.Processes.ts) openssl_output = tr.Processes.Default.Streams.stdout.AbsPath diff --git a/tests/gold_tests/tls/tls_ticket.test.py b/tests/gold_tests/tls/tls_ticket.test.py index 857217c862e..b82fa226357 100644 --- a/tests/gold_tests/tls/tls_ticket.test.py +++ b/tests/gold_tests/tls/tls_ticket.test.py @@ -76,7 +76,6 @@ tr.Setup.Copy('file.ticket') tr.Command = 'echo -e "GET / HTTP/1.0\r\n" | openssl s_client -tls1_2 -connect 127.0.0.1:{0} -sess_out ticket.out'.format(ts.Variables.ssl_port) tr.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server) tr.Processes.Default.StartBefore(Test.Processes.ts) path1 = tr.Processes.Default.Streams.stdout.AbsPath diff --git a/tests/gold_tests/tls/tls_verify.test.py b/tests/gold_tests/tls/tls_verify.test.py index 289d1ac8cbf..2337af77852 100644 --- a/tests/gold_tests/tls/tls_verify.test.py +++ b/tests/gold_tests/tls/tls_verify.test.py @@ -106,7 +106,6 @@ tr.Setup.Copy("ssl/wild.key") tr.Processes.Default.Command = "curl -v -k -H \"host: foo.com\" https://127.0.0.1:{0}".format(ts.Variables.ssl_port) tr.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server_foo) tr.Processes.Default.StartBefore(server_bar) tr.Processes.Default.StartBefore(server) diff --git a/tests/gold_tests/tls/tls_verify_not_pristine.test.py b/tests/gold_tests/tls/tls_verify_not_pristine.test.py index 60183589f54..67b765b6827 100644 --- a/tests/gold_tests/tls/tls_verify_not_pristine.test.py +++ b/tests/gold_tests/tls/tls_verify_not_pristine.test.py @@ -79,7 +79,6 @@ tr.Setup.Copy("ssl/signed-bar.pem") tr.Processes.Default.Command = "curl -v --resolve 'bar.com:{0}:127.0.0.1' -k https://bar.com:{0}".format(ts.Variables.ssl_port) tr.ReturnCode = 0 -# time delay as proxy.config.http.wait_for_cache could be broken tr.Processes.Default.StartBefore(server_foo) tr.Processes.Default.StartBefore(dns) tr.Processes.Default.StartBefore(Test.Processes.ts) diff --git a/tests/gold_tests/tls_hooks/tls_hooks16.test.py b/tests/gold_tests/tls_hooks/tls_hooks16.test.py index 9f2cd21824b..140fbb1bbf6 100644 --- a/tests/gold_tests/tls_hooks/tls_hooks16.test.py +++ b/tests/gold_tests/tls_hooks/tls_hooks16.test.py @@ -58,7 +58,7 @@ tr = Test.AddTestRun("Test one immediate client hello hook") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts tr.StillRunningAfter = server tr.Processes.Default.Command = 'curl -k -H \'host:example.com:{0}\' https://127.0.0.1:{0}'.format(ts.Variables.ssl_port) diff --git a/tests/gold_tests/tls_hooks/tls_hooks17.test.py b/tests/gold_tests/tls_hooks/tls_hooks17.test.py index de18889d16b..c3d0ed6ec24 100644 --- a/tests/gold_tests/tls_hooks/tls_hooks17.test.py +++ b/tests/gold_tests/tls_hooks/tls_hooks17.test.py @@ -58,7 +58,7 @@ tr = Test.AddTestRun("Test one delayed client hello hook") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts tr.StillRunningAfter = server tr.Processes.Default.Command = 'curl -k -H \'host:example.com:{0}\' https://127.0.0.1:{0}'.format(ts.Variables.ssl_port) diff --git a/tests/gold_tests/tls_hooks/tls_hooks18.test.py b/tests/gold_tests/tls_hooks/tls_hooks18.test.py index 5f0864900b4..ddc5cd73e17 100644 --- a/tests/gold_tests/tls_hooks/tls_hooks18.test.py +++ b/tests/gold_tests/tls_hooks/tls_hooks18.test.py @@ -59,7 +59,7 @@ tr = Test.AddTestRun("Test two client hello hooks") tr.Processes.Default.StartBefore(server) -tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port)) +tr.Processes.Default.StartBefore(Test.Processes.ts) tr.StillRunningAfter = ts tr.StillRunningAfter = server tr.Processes.Default.Command = 'curl -k -H \'host:example.com:{0}\' https://127.0.0.1:{0}'.format(ts.Variables.ssl_port) From 21a769d7a3921d8c5a7bb0cf675725234ef8d8d2 Mon Sep 17 00:00:00 2001 From: bneradt Date: Wed, 24 Jun 2020 17:35:31 +0000 Subject: [PATCH 2/2] Addressing Walt's review comments. --- src/traffic_server/traffic_server.cc | 9 +++++++++ tests/gold_tests/autest-site/when.test.ext | 3 ++- tests/gold_tests/pluginTest/slice/slice.test.py | 8 ++++---- .../pluginTest/slice/slice_selfhealing.test.py | 8 ++++---- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc index f7cffccb6df..ac1d953198c 100644 --- a/src/traffic_server/traffic_server.cc +++ b/src/traffic_server/traffic_server.cc @@ -465,6 +465,15 @@ class MemoryLimit : public Continuation * * 1. The cache is initialized. * 2. The ports are open and accept has been called upon them. + * + * Note that Traffic Server configures the port objects and may even open the + * ports before calling accept on those ports. The difference between these two + * events is communicated to plugins via the + * TS_LIFECYCLE_PORTS_INITIALIZED_HOOK and TS_LIFECYCLE_PORTS_READY_HOOK hooks. + * If wait_for_cache is enabled, the difference in time between these events + * may measure in the tens of milliseconds. The message emitted by this + * function happens after this full lifecycle takes place on these ports and + * after cache is initialized. */ static void emit_fully_initialized_message() diff --git a/tests/gold_tests/autest-site/when.test.ext b/tests/gold_tests/autest-site/when.test.ext index 3bd5528697b..3f0a27600ca 100644 --- a/tests/gold_tests/autest-site/when.test.ext +++ b/tests/gold_tests/autest-site/when.test.ext @@ -52,12 +52,13 @@ def FileContains(haystack, needle, desired_count=1): needle, haystack)) return False + needle_regex = re.compile(needle) with open(haystack) as f: needle_seen_count = 0 line_count = 0 for line in f: line_count += 1 - if re.search(needle, line): + if needle_regex.search(line): host.WriteDebug( ['FileContains', 'when'], "Found '{0}' in file '{1}' in line: '{2}', line number: {3}".format( diff --git a/tests/gold_tests/pluginTest/slice/slice.test.py b/tests/gold_tests/pluginTest/slice/slice.test.py index 6dfd50fa3aa..f5b309fa1e1 100644 --- a/tests/gold_tests/pluginTest/slice/slice.test.py +++ b/tests/gold_tests/pluginTest/slice/slice.test.py @@ -87,10 +87,10 @@ ' @plugin=slice.so @pparam=--blockbytes-test={}'.format(block_bytes) ]) -# ts.Disk.records_config.update({ -# 'proxy.config.diags.debug.enabled': 1, -# 'proxy.config.diags.debug.tags': 'slice', -# }) +ts.Disk.records_config.update({ + 'proxy.config.diags.debug.enabled': 0, + 'proxy.config.diags.debug.tags': 'slice', +}) # 0 Test - Prefetch entire asset into cache tr = Test.AddTestRun("Fetch first slice range") diff --git a/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py b/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py index 61b28c7fcb3..3d27d243506 100644 --- a/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py +++ b/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py @@ -68,10 +68,10 @@ ts.Disk.plugin_config.AddLine('xdebug.so') -# ts.Disk.records_config.update({ -# 'proxy.config.diags.debug.enabled': 1, -# 'proxy.config.diags.debug.tags': 'cache_range_requests|slice', -# }) +ts.Disk.records_config.update({ + 'proxy.config.diags.debug.enabled': 0, + 'proxy.config.diags.debug.tags': 'cache_range_requests|slice', +}) curl_and_args = 'curl -s -D /dev/stdout -o /dev/stderr -x localhost:{}'.format(ts.Variables.port) + ' -H "x-debug: x-cache"'