This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.2.x by this push:
new cd7d44088 Fix autest uses of File exists parameter (#8906)
cd7d44088 is described below
commit cd7d4408860744d6cd0009d13c64b974072a59ee
Author: Brian Neradt <[email protected]>
AuthorDate: Mon Jun 13 18:05:56 2022 -0500
Fix autest uses of File exists parameter (#8906)
The AuTest File exists parameter can be configured in one of three ways:
1. If True, then AuTest will fail unless the file exists.
2. If False, then AuTest will fail unless the file does not exist.
3. If None (the default) then no existence check is done.
Many of our tests configured exists=False assuming it would behave like
the default None configuration above. That is, they used exists=False to
turn off verification. That is in fact how AuTest has behaved until now,
but that is a bug in the AuTest framework. The next release of AuTest
will have a fix such that exists=False will now verify that a file does
not in fact exist which will cause some of our tests to fail. This patch
anticipates that fix to AuTest and fixes our use of exists accordingly.
(cherry picked from commit 9d13a8d2ed34884732b3f7d81bb25fb6855733d3)
---
tests/gold_tests/autest-site/trafficserver.test.ext | 2 +-
tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/connector.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/pcollapseslashes.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/psubstitute.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/setstatus.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py | 2 +-
tests/gold_tests/pluginTest/cookie_remap/substitute.test.py | 2 +-
15 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext
b/tests/gold_tests/autest-site/trafficserver.test.ext
index 04e39bed1..a6881f056 100755
--- a/tests/gold_tests/autest-site/trafficserver.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver.test.ext
@@ -201,7 +201,7 @@ def MakeATSProcess(obj, name, command='traffic_server',
select_ports=True,
p.Disk.error_log = p.Streams.stderr
else:
tmpname = os.path.join(log_dir, fname)
- p.Disk.File(tmpname, id='error_log', exists=False)
+ p.Disk.File(tmpname, id='error_log')
# diags.log
fname = log_data['diags']
if fname == 'stdout':
diff --git a/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py
b/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py
index f75035847..406c5831a 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/bucketconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/bucketconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
index 233a7c4d4..180a7e57c 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
@@ -51,7 +51,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/collapseconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/collapseconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
index ee39ff8f6..2e5553c9c 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/connectorconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/connectorconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py
b/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py
index a25e09380..7652962b7 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/existsconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/existsconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py
b/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py
index 0a5a617e3..ec73ce203 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/matchconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/matchconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py
b/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py
index 867f9db3d..5ec40a10d 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/matchuriconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/matchuriconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
index 6372b0d9f..1ebfac393 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
@@ -76,7 +76,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/matrixconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/matrixconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py
b/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py
index f27a05cfd..c4caf79ba 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/notexistsconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/notexistsconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/pcollapseslashes.test.py
b/tests/gold_tests/pluginTest/cookie_remap/pcollapseslashes.test.py
index ec46d1b5e..1e93fe410 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/pcollapseslashes.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/pcollapseslashes.test.py
@@ -51,7 +51,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/collapseconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/collapseconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/psubstitute.test.py
b/tests/gold_tests/pluginTest/cookie_remap/psubstitute.test.py
index 3e7149512..d56f1f61a 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/psubstitute.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/psubstitute.test.py
@@ -67,7 +67,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/substituteconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/substituteconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py
b/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py
index 55c602266..64bdac0bb 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/regexconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/regexconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/setstatus.test.py
b/tests/gold_tests/pluginTest/cookie_remap/setstatus.test.py
index 976779a30..ea0387765 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/setstatus.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/setstatus.test.py
@@ -37,7 +37,7 @@ ts.Disk.records_config.update({
'proxy.config.diags.debug.tags': 'cookie_remap.*|http.*|dns.*',
})
-ts.Disk.File(ts.Variables.CONFIGDIR + "/statusconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/statusconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
index fc0878fc5..6c44a62ee 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
@@ -61,7 +61,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
config1 = config1.replace("$ALTPORT", str(server2.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/subcookie.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/subcookie.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(
diff --git a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
b/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
index 13b410280..572418fca 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
@@ -59,7 +59,7 @@ ts.Disk.records_config.update({
config1 = config1.replace("$PORT", str(server.Variables.Port))
-ts.Disk.File(ts.Variables.CONFIGDIR + "/substituteconfig.txt", exists=False,
id="config1")
+ts.Disk.File(ts.Variables.CONFIGDIR + "/substituteconfig.txt", id="config1")
ts.Disk.config1.WriteOn(config1)
ts.Disk.remap_config.AddLine(