Skip to content

Commit 746bcb5

Browse files
author
Serris Lew
committed
Add ts runtimedir path, update existing autest for uds case instead of adding new autest
1 parent 5efbc38 commit 746bcb5

File tree

110 files changed

+665
-3775
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+665
-3775
lines changed

tests/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ else()
5959
DESTINATION ${CMAKE_GOLD_DIR}
6060
FILES_MATCHING
6161
PATTERN "*"
62-
PATTERN "*_uds.test.py" EXCLUDE
6362
)
6463
add_subdirectory(gold_tests_filtered/tls)
6564
endif()

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ ts=Test.MakeATSProcess("ts")
132132
#first test is a miss for default
133133
tr=Test.AddTestRun()
134134
# get port for command from Variables
135-
tr.MakeCurlCommand('"http://127.0.0.1:{0}" --verbose'.format(ts.Variables.port))
135+
tr.MakeCurlCommand('"http://127.0.0.1:{0}" --verbose'.format(ts.Variables.port), uds_path=ts.Variables.uds_path)
136136

137137
```
138138

tests/gold_tests/autest-site/conditions.test.ext

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def PluginExists(self, pluginname):
110110
return self.Condition(lambda: os.path.isfile(path), path + " not found.")
111111

112112

113-
def CurlUds(self):
113+
def CurlUsingUnixDomainSocket(self):
114114
return self.Condition(lambda: self.Variables.get("CurlUds", False), "Curl using UDS. Not relevant for test")
115115

116116

@@ -123,4 +123,4 @@ ExtendCondition(HasCurlVersion)
123123
ExtendCondition(HasCurlFeature)
124124
ExtendCondition(HasCurlOption)
125125
ExtendCondition(PluginExists)
126-
ExtendCondition(CurlUds)
126+
ExtendCondition(CurlUsingUnixDomainSocket)

tests/gold_tests/basic/copy_config.test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@
3939
t = Test.AddTestRun("Talk to ts1")
4040
t.Processes.Default.StartBefore(ts1)
4141
t.Processes.Default.StartBefore(ts2)
42-
t.MakeCurlCommand("127.0.0.1:{port}".format(port=ts1.Variables.port))
42+
t.MakeCurlCommand("127.0.0.1:{port}".format(port=ts1.Variables.port), uds_path=ts.Variables.uds_path)
4343
t.ReturnCode = 0
4444
t.StillRunningAfter = ts1
4545
t.StillRunningAfter += ts2
4646

4747
# setup a testrun
4848
t = Test.AddTestRun("Talk to ts2")
49-
t.MakeCurlCommandMulti("{{curl_base}} 127.0.0.1:{port}".format(port=ts2.Variables.port))
49+
t.MakeCurlCommandMulti("{{curl_base}} 127.0.0.1:{port}".format(port=ts2.Variables.port), uds_path=ts.Variables.uds_path)
5050
t.ReturnCode = 0
5151
t.StillRunningAfter = ts1
5252
t.StillRunningAfter += ts2

tests/gold_tests/bigobj/bigobj.test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def create_pushfile():
6464

6565

6666
ipv4flag = ""
67-
if not Condition.CurlUds():
67+
if not Condition.CurlUsingUnixDomainSocket():
6868
ipv4flag = "--ipv4"
6969

7070
tr = Test.AddTestRun("PUSH an object to the cache")
@@ -85,7 +85,7 @@ def create_pushfile():
8585
tr.Processes.Default.Streams.All = Testers.ContainsExpression("HTTP/1.1 200 OK", "Should fetch pushed object")
8686
tr.Processes.Default.Streams.All = Testers.ContainsExpression("Content-length: 102400", "Content size should be accurate")
8787

88-
if not Condition.CurlUds():
88+
if not Condition.CurlUsingUnixDomainSocket():
8989
tr = Test.AddTestRun("GET bigobj: TLS, HTTP/1.1, IPv4")
9090
tr.MakeCurlCommand(f'--verbose --ipv4 --http1.1 --insecure https://localhost:{ts.Variables.ssl_port}/bigobj')
9191
tr.Processes.Default.ReturnCode = 0

tests/gold_tests/bigobj/bigobj_uds.test.py

Lines changed: 0 additions & 112 deletions
This file was deleted.

tests/gold_tests/cache/background_fill.test.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
Test.Summary = 'Exercise Background Fill'
2222
Test.SkipUnless(Condition.HasCurlFeature('http2'), Condition.HasProxyVerifierVersion('2.8.0'))
23-
Test.SkipIf(Condition.CurlUds())
2423
Test.ContinueOnFail = True
2524

2625

@@ -55,7 +54,8 @@ def __setupTS(self, ts_names=['default']):
5554

5655
self.ts[name].Disk.records_config.update(
5756
{
58-
"proxy.config.http.server_ports": f"{self.ts[name].Variables.port} {self.ts[name].Variables.ssl_port}:ssl",
57+
"proxy.config.http.server_ports":
58+
f"{self.ts[name].Variables.port} {self.ts[name].Variables.ssl_port}:ssl {self.ts[name].Variables.uds_path}",
5959
"proxy.config.http.background_fill_active_timeout": "0",
6060
"proxy.config.http.background_fill_completed_threshold": "0.0",
6161
"proxy.config.http.cache.required_headers": 0, # Force cache
@@ -113,7 +113,8 @@ def __testCase0(self):
113113
timeout 2 {{curl}} --http1.1 -vs http://127.0.0.1:{self.ts['for_httpbin'].Variables.port}/drip?duration=4;
114114
sleep 4;
115115
{{curl}} --http1.1 -vs http://127.0.0.1:{self.ts['for_httpbin'].Variables.port}/drip?duration=4
116-
""")
116+
""",
117+
uds_path=self.ts['for_httpbin'].Variables.uds_path)
117118
tr.Processes.Default.ReturnCode = 0
118119
tr.Processes.Default.Streams.stderr = Testers.Any(
119120
"gold/background_fill_0_stderr_H.gold", "gold/background_fill_0_stderr_W.gold")
@@ -131,7 +132,8 @@ def __testCase1(self):
131132
timeout 3 {{curl}} --http1.1 -vsk https://127.0.0.1:{self.ts['for_httpbin'].Variables.ssl_port}/drip?duration=4;
132133
sleep 5;
133134
{{curl}} --http1.1 -vsk https://127.0.0.1:{self.ts['for_httpbin'].Variables.ssl_port}/drip?duration=4
134-
""")
135+
""",
136+
uds_path=self.ts['for_httpbin'].Variables.uds_path)
135137
tr.Processes.Default.ReturnCode = 0
136138
tr.Processes.Default.Streams.stderr = Testers.Any(
137139
"gold/background_fill_1_stderr_H.gold", "gold/background_fill_1_stderr_W.gold")
@@ -149,7 +151,8 @@ def __testCase2(self):
149151
timeout 3 {{curl}} --http2 -vsk https://127.0.0.1:{self.ts['for_httpbin'].Variables.ssl_port}/drip?duration=4;
150152
sleep 5;
151153
{{curl}} --http2 -vsk https://127.0.0.1:{self.ts['for_httpbin'].Variables.ssl_port}/drip?duration=4
152-
""")
154+
""",
155+
uds_path=self.ts['for_httpbin'].Variables.uds_path)
153156
tr.Processes.Default.ReturnCode = 0
154157
tr.Processes.Default.Streams.stderr = Testers.Any(
155158
"gold/background_fill_2_stderr_H.gold", "gold/background_fill_2_stderr_W.gold")
@@ -173,9 +176,10 @@ def __testCase3(self):
173176

174177
def run(self):
175178
self.__testCase0()
176-
self.__testCase1()
177-
self.__testCase2()
178-
self.__testCase3()
179+
if not Condition.CurlUsingUnixDomainSocket():
180+
self.__testCase1()
181+
self.__testCase2()
182+
self.__testCase3()
179183

180184

181185
BackgroundFillTest().run()

tests/gold_tests/cache/background_fill_uds.test.py

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)