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 19a670e  Enable conf_remap_float test and remove special case for 
local config file (#8540)
19a670e is described below

commit 19a670ebc487148f819e248462962a7fe1adab69
Author: Randall Meyer <[email protected]>
AuthorDate: Tue Nov 30 17:58:46 2021 -0800

    Enable conf_remap_float test and remove special case for local config file 
(#8540)
    
    (cherry picked from commit 3524b79285a52fdd190b8485adf0a5e1b5a3f989)
---
 .../gold_tests/autest-site/trafficserver.test.ext  |  6 ------
 ...onf_remap_float.py => conf_remap_float.test.py} | 23 ++++++----------------
 2 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/tests/gold_tests/autest-site/trafficserver.test.ext 
b/tests/gold_tests/autest-site/trafficserver.test.ext
index cca27a5..04e39be 100755
--- a/tests/gold_tests/autest-site/trafficserver.test.ext
+++ b/tests/gold_tests/autest-site/trafficserver.test.ext
@@ -246,11 +246,6 @@ def MakeATSProcess(obj, name, command='traffic_server', 
select_ports=True,
     tmpname = os.path.join(config_dir, fname)
     p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
 
-    # for conf_remap_float, used by conf_remap plugin
-    fname = "delain.config"
-    tmpname = os.path.join(config_dir, fname)
-    p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
-
     fname = "hosting.config"
     tmpname = os.path.join(config_dir, fname)
     p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
@@ -259,7 +254,6 @@ def MakeATSProcess(obj, name, command='traffic_server', 
select_ports=True,
     tmpname = os.path.join(config_dir, fname)
     p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
 
-    # magic file that should probally not exist
     fname = "logging.yaml"
     tmpname = os.path.join(config_dir, fname)
     p.Disk.File(tmpname, id=make_id(fname), typename="ats:config")
diff --git a/tests/gold_tests/remap/conf_remap_float.py 
b/tests/gold_tests/remap/conf_remap_float.test.py
similarity index 78%
rename from tests/gold_tests/remap/conf_remap_float.py
rename to tests/gold_tests/remap/conf_remap_float.test.py
index 805f24e..17cc7cf 100644
--- a/tests/gold_tests/remap/conf_remap_float.py
+++ b/tests/gold_tests/remap/conf_remap_float.test.py
@@ -1,5 +1,3 @@
-'''
-'''
 #  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
@@ -17,8 +15,6 @@
 #  limitations under the License.
 
 
-import os
-
 Test.Summary = '''
 Test command: traffic_ctl config describe 
proxy.config.http.background_fill_completed_threshold (YTSATS-3309)
 '''
@@ -26,21 +22,14 @@ Test.testName = 'Float in conf_remap Config Test'
 
 ts = Test.MakeATSProcess("ts", command="traffic_manager", select_ports=True)
 
-# Add dummy remap rule
-ts.Disk.remap_config.AddLine(
-    'map http://cdn.example.com/ http://origin.example.com/ 
@plugin=conf_remap.so @pparam={file}'.format(
-        file=os.path.join(ts.RunDirectory, 'ts/config/delain.config'))
-)
-
-ts.Disk.delain_config.AddLine(
+ts.Disk.MakeConfigFile('conf_remap.config').AddLines([
     'CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 
0.500000'
-)
+])
 
-#
-# Test body
-#
+ts.Disk.remap_config.AddLine(
+    f"map http://cdn.example.com/ http://origin.example.com/ 
@plugin=conf_remap.so @pparam={Test.RunDirectory}/ts/config/conf_remap.config"
+)
 
-# First reload
 tr = Test.AddTestRun("traffic_ctl command")
 tr.Env = ts.Env
 tr.TimeOut = 5
@@ -49,4 +38,4 @@ tr.StillRunningAfter = ts
 p = tr.Processes.Default
 p.Command = "traffic_ctl config describe 
proxy.config.http.background_fill_completed_threshold"
 p.ReturnCode = 0
-p.StartBefore(Test.Processes.ts, 
ready=When.FileExists(os.path.join(tr.RunDirectory, 'ts/log/diags.log')))
+p.StartBefore(Test.Processes.ts)

Reply via email to