[Privoxy-commits] [privoxy] 33/41: tests/cts: When there's lots of POST data, read it from a file

User Git git at git.privoxy.org
Wed Mar 20 12:39:10 CET 2024


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit a50caf716686cac436937bdfd7bcb2444e5f59c5
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Tue May 24 08:07:40 2022 +0200

    tests/cts: When there's lots of POST data, read it from a file
    
    ... instead of the command line.
    
    Makes it less likely that the curl executions fails due
    to the argument list being too long.
    
    Reported by: Roland
    
    Sponsored by: Privoxy project funds collected at SPI
---
 tests/cts/client-body-filter/data/test12       | 5 ++++-
 tests/cts/client-body-tagger-https/data/test15 | 5 ++++-
 tests/cts/client-body-tagger-https/data/test7  | 5 ++++-
 tests/cts/client-body-tagger/data/test7        | 5 ++++-
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/tests/cts/client-body-filter/data/test12 b/tests/cts/client-body-filter/data/test12
index 8db65fde..b2d3ad6a 100644
--- a/tests/cts/client-body-filter/data/test12
+++ b/tests/cts/client-body-filter/data/test12
@@ -39,8 +39,11 @@ proxy
 # Sending the first request to appease the test framework.
 # We mainly care about the second request which is too large for Privoxy to buffer it.
 <command>
-http://%HOSTIP:%HTTPPORT/first-request/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" http://%HOSTIP:%HTTPPORT/second-request/%TESTNUMBER
+http://%HOSTIP:%HTTPPORT/first-request/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER http://%HOSTIP:%HTTPPORT/second-request/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>
diff --git a/tests/cts/client-body-tagger-https/data/test15 b/tests/cts/client-body-tagger-https/data/test15
index f16f5a38..ece0648b 100644
--- a/tests/cts/client-body-tagger-https/data/test15
+++ b/tests/cts/client-body-tagger-https/data/test15
@@ -40,8 +40,11 @@ Two requests to the same URL. The second one is a POST request with an offending
 proxy
 </features>
 <command>
--s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
+-s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>
diff --git a/tests/cts/client-body-tagger-https/data/test7 b/tests/cts/client-body-tagger-https/data/test7
index dd72ae85..445148d9 100644
--- a/tests/cts/client-body-tagger-https/data/test7
+++ b/tests/cts/client-body-tagger-https/data/test7
@@ -42,8 +42,11 @@ Two requests to the same URL. The second one is a POST request with an offending
 proxy
 </features>
 <command>
--s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
+-s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER -s --write-out '%{stderr}%{response_code}\n' --insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>
diff --git a/tests/cts/client-body-tagger/data/test7 b/tests/cts/client-body-tagger/data/test7
index d108d812..753d89f9 100644
--- a/tests/cts/client-body-tagger/data/test7
+++ b/tests/cts/client-body-tagger/data/test7
@@ -29,8 +29,11 @@ Two requests to the same URL. The second one is a POST request with an offending
 proxy
 </features>
 <command>
--s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next -d "blafasel%repeat[20000 x padding]%" -s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
+-s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER --next -d @log/post-data-%TESTNUMBER -s --write-out '%{stderr}%{response_code}\n' http://%HOSTIP:%HTTPPORT/%TESTNUMBER
 </command>
+<file name="log/post-data-%TESTNUMBER">
+blafasel%repeat[20000 x padding]%
+</file>
 </client>
 
 <verify>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list