From a3f02ddcd2e56be541110d48e82de0b2c9c0de1b Mon Sep 17 00:00:00 2001 From: Brian Neradt Date: Wed, 24 Jun 2020 13:17:14 -0500 Subject: [PATCH] AuTest: New 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. (cherry picked from commit 93a72ecaf453e4186a3eb8a25f5590f88bd4638e) Conflicts: tests/gold_tests/autest-site/copy_config.test.ext tests/gold_tests/basic/deny0.test.py tests/gold_tests/bigobj/bigobj.test.py tests/gold_tests/cache/cache-control.test.py tests/gold_tests/chunked_encoding/chunked_encoding.test.py tests/gold_tests/continuations/double.test.py tests/gold_tests/continuations/session_id.test.py tests/gold_tests/h2/h2spec.test.py tests/gold_tests/h2/http2.test.py tests/gold_tests/h2/nghttp.test.py tests/gold_tests/headers/cache_and_req_body.test.py tests/gold_tests/headers/cachedIMSRange.test.py tests/gold_tests/headers/forwarded.test.py tests/gold_tests/headers/syntax.test.py tests/gold_tests/ip_allow/ip_allow.test.py tests/gold_tests/logging/log-filter.test.py tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests.test.py tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_cachekey.test.py tests/gold_tests/pluginTest/cache_range_requests/cache_range_requests_ims.test.py tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py tests/gold_tests/pluginTest/regex_revalidate/regex_revalidate.test.py tests/gold_tests/pluginTest/slice/slice.test.py tests/gold_tests/pluginTest/slice/slice_error.test.py tests/gold_tests/pluginTest/slice/slice_regex.test.py tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py tests/gold_tests/pluginTest/sslheaders/sslheaders.test.py tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py tests/gold_tests/post_slow_server/post_slow_server.test.py tests/gold_tests/redirect/redirect_actions.test.py tests/gold_tests/redirect/redirect_post.test.py tests/gold_tests/remap/regex_map.test.py --- src/traffic_server/traffic_server.cc | 61 +++++++++++++++++-- .../autest-site/copy_config.test.ext | 55 ----------------- .../autest-site/traffic_replay.test.ext | 2 +- .../autest-site/trafficserver.test.ext | 25 ++++++-- 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 | 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 | 1 - tests/gold_tests/continuations/double.test.py | 5 +- .../continuations/double_h2.test.py | 5 +- .../continuations/openclose.test.py | 7 +-- .../continuations/openclose_h2.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 | 3 +- tests/gold_tests/headers/accept_webp.test.py | 2 - .../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 | 2 +- .../regex_remap/regex_remap.test.py | 3 +- .../regex_revalidate/regex_revalidate.test.py | 2 - .../gold_tests/pluginTest/slice/slice.test.py | 5 +- .../pluginTest/slice/slice_error.test.py | 6 +- .../pluginTest/slice/slice_regex.test.py | 8 +-- .../slice/slice_selfhealing.test.py | 5 +- .../pluginTest/sslheaders/sslheaders.test.py | 5 +- .../pluginTest/test_hooks/hook_add.test.py | 6 +- .../test_hooks/ssn_start_delay_hook.test.py | 3 +- .../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 +- 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 | 2 +- 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 +- 94 files changed, 184 insertions(+), 245 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 15fe8ff7b50..ab76ec5d7df 100644 --- a/src/traffic_server/traffic_server.cc +++ b/src/traffic_server/traffic_server.cc @@ -45,6 +45,7 @@ #include #include +#include #include #include @@ -174,10 +175,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 @@ -453,6 +454,42 @@ 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. + * + * 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() +{ + 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) { @@ -710,7 +747,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. @@ -725,8 +763,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); @@ -2092,10 +2134,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 d7102402ee0..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 BaseException: - 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 c4b2e6910b7..3fe102068f5 100644 --- a/tests/gold_tests/autest-site/traffic_replay.test.ext +++ b/tests/gold_tests/autest-site/traffic_replay.test.ext @@ -83,7 +83,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 8c3a7e4f5ed..0405dafe668 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 @@ -279,10 +280,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") # set the ports if select_ports: 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 cf808c4ac53..a0242d72ef4 100644 --- a/tests/gold_tests/basic/deny0.test.py +++ b/tests/gold_tests/basic/deny0.test.py @@ -31,10 +31,10 @@ 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({ # need this so the domain gets a chance to be evaluated through DNS - '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 + '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.dns.nameservers': '127.0.0.1:{0}'.format(dns.Variables.Port), 'proxy.config.dns.resolv_conf': 'NULL', 'proxy.config.url_remap.remap_required': 0 }) Test.Setup.Copy(os.path.join(Test.Variables.AtsTestToolsDir, 'tcp_client.py')) @@ -54,7 +54,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/cache/cache-control.test.py b/tests/gold_tests/cache/cache-control.test.py index 11964adefb3..972007ddcf4 100644 --- a/tests/gold_tests/cache/cache-control.test.py +++ b/tests/gold_tests/cache/cache-control.test.py @@ -60,8 +60,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, }) @@ -72,7 +70,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 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 e30c57472dc..190540612b4 100644 --- a/tests/gold_tests/chunked_encoding/chunked_encoding.test.py +++ b/tests/gold_tests/chunked_encoding/chunked_encoding.test.py @@ -104,7 +104,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 4c31ce61f08..5c5ed68ae57 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") Test.testName = "" @@ -74,7 +74,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 cf046a847a4..a2cc6fb2fc0 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 7b88420af3b..247345229fa 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 7c62de94261..e205858556e 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/h2/h2enable.test.py b/tests/gold_tests/h2/h2enable.test.py index 6f7cf02f1eb..a67bb362747 100644 --- a/tests/gold_tests/h2/h2enable.test.py +++ b/tests/gold_tests/h2/h2enable.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/h2enable_no_accept_threads.test.py b/tests/gold_tests/h2/h2enable_no_accept_threads.test.py index 0e914d0c385..3776f581d6b 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 e91fd229ff1..90c92de54be 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", select_ports=False) +ts = Test.MakeATSProcess("ts", select_ports=False, enable_cache=False) # add ssl materials like key, certificates for the server ts.addSSLfile("ssl/server.pem") @@ -51,7 +51,6 @@ 'proxy.config.http.server_ports': '{0} {1}:ssl'.format(ts.Variables.port, ts.Variables.ssl_port), '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, @@ -70,7 +69,7 @@ test_run.Processes.Default.Command = 'h2spec {0} -t -k --timeout 10 -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 cbced007e59..a1ff95792c9 100644 --- a/tests/gold_tests/h2/http2.test.py +++ b/tests/gold_tests/h2/http2.test.py @@ -105,7 +105,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") @@ -128,7 +128,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, @@ -148,7 +147,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 117b28610a1..ce22cbc5788 100644 --- a/tests/gold_tests/h2/http2_priority.test.py +++ b/tests/gold_tests/h2/http2_priority.test.py @@ -43,7 +43,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") @@ -55,7 +55,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 574f00ffe83..453e4b4aa0f 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 2bed24bed26..1a4c93972c4 100644 --- a/tests/gold_tests/h2/nghttp.test.py +++ b/tests/gold_tests/h2/nghttp.test.py @@ -49,7 +49,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") @@ -68,7 +68,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, }) diff --git a/tests/gold_tests/headers/accept_webp.test.py b/tests/gold_tests/headers/accept_webp.test.py index 26998fd62a6..f1ea0b9d82e 100644 --- a/tests/gold_tests/headers/accept_webp.test.py +++ b/tests/gold_tests/headers/accept_webp.test.py @@ -44,8 +44,6 @@ 'proxy.config.diags.debug.tags': 'http_match', 'proxy.config.http.cache.ignore_accept_mismatch': 0, 'proxy.config.http.insert_response_via_str': 3, - 'proxy.config.http.cache.http': 1, - 'proxy.config.http.wait_for_cache': 1, }) ts.Disk.remap_config.AddLine( 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 c9aba744bd1..b2ab6d04622 100644 --- a/tests/gold_tests/headers/cache_and_req_body.test.py +++ b/tests/gold_tests/headers/cache_and_req_body.test.py @@ -42,8 +42,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( @@ -92,7 +90,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 diff --git a/tests/gold_tests/headers/cachedIMSRange.test.py b/tests/gold_tests/headers/cachedIMSRange.test.py index a799d637bcb..afc742bce2d 100644 --- a/tests/gold_tests/headers/cachedIMSRange.test.py +++ b/tests/gold_tests/headers/cachedIMSRange.test.py @@ -99,8 +99,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( @@ -110,7 +108,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 diff --git a/tests/gold_tests/headers/forwarded.test.py b/tests/gold_tests/headers/forwarded.test.py index 5fed2056d67..edd02c6a71a 100644 --- a/tests/gold_tests/headers/forwarded.test.py +++ b/tests/gold_tests/headers/forwarded.test.py @@ -87,7 +87,6 @@ def baselineTsSetup(ts, sslPort): 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), @@ -105,7 +104,9 @@ def baselineTsSetup(ts, sslPort): ) -ts = Test.MakeATSProcess("ts", select_ports=False) +# Disable the cache to make sure each request is forwarded to the origin +# server. +ts = Test.MakeATSProcess("ts", select_ports=False, enable_cache=False) baselineTsSetup(ts, 4443) @@ -159,7 +160,7 @@ def baselineTsSetup(ts, sslPort): # 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) @@ -214,7 +215,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 262b8358561..f9ea5753cb0 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 diff --git a/tests/gold_tests/headers/via.test.py b/tests/gold_tests/headers/via.test.py index 7fc07bc25e1..1a2df879596 100644 --- a/tests/gold_tests/headers/via.test.py +++ b/tests/gold_tests/headers/via.test.py @@ -79,7 +79,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 32c0261c3b4..6680a97ed45 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 e5b850e88da..c5f6a930ece 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 e8799d34eef..82aca0ab4d8 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 f88afc42429..c9e1fb07b8b 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": ""} @@ -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-filter.test.py b/tests/gold_tests/logging/log-filter.test.py index 95c1aafebf3..2ce879db45a 100644 --- a/tests/gold_tests/logging/log-filter.test.py +++ b/tests/gold_tests/logging/log-filter.test.py @@ -22,13 +22,12 @@ Test log filter. ''' -ts = Test.MakeATSProcess("ts") +ts = Test.MakeATSProcess("ts", enable_cache=False) replay_file = "log-filter.replays.yaml" server = Test.MakeVerifierServerProcess("server", replay_file) 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 3caa99a3d81..d90eaddf71a 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 ba5592849b3..3e88b9f64bd 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 @@ -229,8 +229,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) @@ -239,7 +237,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 02cf665c51a..2e10d05d6a0 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 @@ -162,8 +162,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) @@ -172,7 +170,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 8a6a953cf3e..7ac7af78a8c 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 @@ -101,8 +101,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) @@ -111,7 +109,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 8c545335a31..cfb61f91af6 100644 --- a/tests/gold_tests/pluginTest/cert_update/cert_update.test.py +++ b/tests/gold_tests/pluginTest/cert_update/cert_update.test.py @@ -83,7 +83,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 --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 72528e74069..7c301b99abb 100644 --- a/tests/gold_tests/pluginTest/combo_handler/combo_handler.test.py +++ b/tests/gold_tests/pluginTest/combo_handler/combo_handler.test.py @@ -112,8 +112,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 b8b142dd248..fdc2097e07e 100644 --- a/tests/gold_tests/pluginTest/compress/compress.test.py +++ b/tests/gold_tests/pluginTest/compress/compress.test.py @@ -94,10 +94,9 @@ def curl_post(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, @@ -126,7 +125,7 @@ def curl_post(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 ff56f86f8b6..f75035847e0 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py @@ -79,7 +79,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 c25ee53f9e2..233a7c4d4ed 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py @@ -67,7 +67,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 8cd16b82d54..ee39ff8f67f 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py @@ -79,7 +79,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 dd53fbf72da..a25e093804e 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py @@ -79,7 +79,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 39e0a75871b..0a5a617e3b1 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py @@ -79,7 +79,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 43e20f442aa..867f9db3d89 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py @@ -78,7 +78,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 404f63ff3a3..6372b0d9f25 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py @@ -101,7 +101,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 e96d940a2f6..f27a05cfd7b 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py @@ -78,7 +78,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 417ac319c21..d22f8106c71 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py @@ -79,7 +79,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 677dc7cbcf0..fc0878fc585 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py @@ -83,7 +83,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 7ecd8e4652a..13b41028049 100644 --- a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py +++ b/tests/gold_tests/pluginTest/cookie_remap/substitute.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/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 b6a390a6640..7160a900eeb 100644 --- a/tests/gold_tests/pluginTest/lua/lua_states_stats.test.py +++ b/tests/gold_tests/pluginTest/lua/lua_states_stats.test.py @@ -63,7 +63,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/regex_remap/regex_remap.test.py b/tests/gold_tests/pluginTest/regex_remap/regex_remap.test.py index 210d5015680..ddb12f09e6a 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", command="traffic_server") +ts = Test.MakeATSProcess("ts", command="traffic_server", enable_cache=False) testName = "regex_remap" @@ -70,7 +70,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, 'proxy.config.http.server_ports': '{}'.format(ts.Variables.port), }) 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 dd9babb1d1e..174bbf42f61 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 fc73aa29f9c..18bbbace29b 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, }) # 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 3579c7125b5..6e3275cd211 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 @@ -311,7 +309,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 719156b6880..7bc66443248 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 8140e63f078..3a70c965ae7 100644 --- a/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py +++ b/tests/gold_tests/pluginTest/slice/slice_selfhealing.test.py @@ -68,10 +68,7 @@ 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', }) @@ -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 2ad458f61e8..00a3ae156a4 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", 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") @@ -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 71532523edd..43e824247f5 100644 --- a/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py +++ b/tests/gold_tests/pluginTest/test_hooks/hook_add.test.py @@ -30,12 +30,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, }) @@ -48,8 +47,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/ssn_start_delay_hook.test.py b/tests/gold_tests/pluginTest/test_hooks/ssn_start_delay_hook.test.py index 738630fdb4f..ce333e07975 100644 --- a/tests/gold_tests/pluginTest/test_hooks/ssn_start_delay_hook.test.py +++ b/tests/gold_tests/pluginTest/test_hooks/ssn_start_delay_hook.test.py @@ -30,12 +30,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, }) 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 17a218b2988..fb2e5bb4fc9 100644 --- a/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py +++ b/tests/gold_tests/pluginTest/test_hooks/test_hooks.test.py @@ -36,13 +36,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), @@ -67,8 +68,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 7ca1ef0df2a..566816fbaef 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 a1e82ba5b70..999d958b889 100644 --- a/tests/gold_tests/pluginTest/tsapi/tsapi.test.py +++ b/tests/gold_tests/pluginTest/tsapi/tsapi.test.py @@ -36,13 +36,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), @@ -67,8 +68,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 3aa1aed2f70..c0c294bcb75 100644 --- a/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py +++ b/tests/gold_tests/pluginTest/uri_signing/uri_signing.test.py @@ -73,14 +73,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 9a4ac8e6929..07e993df860 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/redirect/redirect.test.py b/tests/gold_tests/redirect/redirect.test.py index 06aff9fe71a..318d44b3533 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 8b8b93c2432..257cebacc04 100644 --- a/tests/gold_tests/redirect/redirect_actions.test.py +++ b/tests/gold_tests/redirect/redirect_actions.test.py @@ -109,12 +109,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 c3073efe079..8c7e3527b88 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 f46a3512f6b..551f5486644 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 45feb1ddd83..017f57d9be1 100644 --- a/tests/gold_tests/remap/remap_https.test.py +++ b/tests/gold_tests/remap/remap_https.test.py @@ -72,11 +72,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 d88af2de5ea..b9a732d82f3 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 5ddfc200de4..782f40dab83 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 fe0653a913a..02d0bdff2a4 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) diff --git a/tests/gold_tests/tls/tls.test.py b/tests/gold_tests/tls/tls.test.py index bf06da797dd..a9ad27c1804 100644 --- a/tests/gold_tests/tls/tls.test.py +++ b/tests/gold_tests/tls/tls.test.py @@ -74,8 +74,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 9b96341198c..5274bf4828c 100644 --- a/tests/gold_tests/tls/tls_0rtt_server.test.py +++ b/tests/gold_tests/tls/tls_0rtt_server.test.py @@ -134,7 +134,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 7d091b1dd07..891b002458e 100644 --- a/tests/gold_tests/tls/tls_check_cert_selection.test.py +++ b/tests/gold_tests/tls/tls_check_cert_selection.test.py @@ -75,7 +75,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 9256e2e5355..7d387390bd5 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 @@ -101,7 +101,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(foo_ec_string, "Should select EC cert", reflags=re.S | re.M) diff --git a/tests/gold_tests/tls/tls_client_cert2.test.py b/tests/gold_tests/tls/tls_client_cert2.test.py index 1b2fe8478ed..fd917b17f7e 100644 --- a/tests/gold_tests/tls/tls_client_cert2.test.py +++ b/tests/gold_tests/tls/tls_client_cert2.test.py @@ -120,7 +120,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 70e26a85c3f..8e45837dbd9 100644 --- a/tests/gold_tests/tls/tls_hooks_verify.test.py +++ b/tests/gold_tests/tls/tls_hooks_verify.test.py @@ -74,7 +74,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 5146103705f..4197d791fc2 100644 --- a/tests/gold_tests/tls/tls_session_cache.test.py +++ b/tests/gold_tests/tls/tls_session_cache.test.py @@ -86,7 +86,6 @@ def checkSession(ev): 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 a8fc3b9b02d..0f057ff0c46 100644 --- a/tests/gold_tests/tls/tls_ticket.test.py +++ b/tests/gold_tests/tls/tls_ticket.test.py @@ -75,7 +75,6 @@ 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 2c961b477df..08226a5c686 100644 --- a/tests/gold_tests/tls/tls_verify.test.py +++ b/tests/gold_tests/tls/tls_verify.test.py @@ -115,7 +115,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 d5744519ce1..9c4aa008fcc 100644 --- a/tests/gold_tests/tls/tls_verify_not_pristine.test.py +++ b/tests/gold_tests/tls/tls_verify_not_pristine.test.py @@ -82,7 +82,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 fb54094d70d..ff090e3d03e 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 43074c23318..fc02a0b8bd4 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 4ce79753186..9511c738832 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)