From fb11e45f9cd3fbd5f4c284c762f39b0cf75449bf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 21 Sep 2022 12:32:16 +0200 Subject: [PATCH] test972: verify the output without using external tool It seems too restrictive to assume and use an external tool to verify the JSON. This now verifies the outut byte per byte. We could consider building a local "JSON verifyer" in a future. Remove 'jsonlint' from the CI job. Reported-by: Marcel Raad Fixes #9563 Closes #9564 --- .azure-pipelines.yml | 2 +- tests/data/test972 | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index c21d49f72..5842aeb7e 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -59,7 +59,7 @@ stages: matrix: default: name: default - install: jsonlint + install: configure: --enable-debug --with-openssl disable_ipv6: name: w/o IPv6 diff --git a/tests/data/test972 b/tests/data/test972 index 971f1faf6..0bcf04e39 100644 --- a/tests/data/test972 +++ b/tests/data/test972 @@ -28,9 +28,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i # # Client-side - -/usr/bin/which jsonlint-php >log/%TESTNUMBER-check - + http @@ -47,7 +45,7 @@ CURL_VERSION=curl-unit-test-fake-version Verify JSON output -http://%HOSTIP:%HTTPPORT/%TESTNUMBER -s --write-out '%{json}' -o log/out972 | jsonlint-php -q +http://%HOSTIP:%HTTPPORT/%TESTNUMBER -s --write-out '%{json}\n' -o log/out972 @@ -61,5 +59,8 @@ User-Agent: curl/%VERSION Accept: */* + +{"content_type":"text/html","errormsg":null,"exitcode":0,"filename_effective":"log/out972","ftp_entry_path":null,"http_code":200,"http_connect":0,"http_version":"1.1","local_ip":"%HOSTIP","local_port":13,"method":"GET","num_connects":1,"num_headers":9,"num_redirects":0,"proxy_ssl_verify_result":0,"redirect_url":null,"referer":null,"remote_ip":"%HOSTIP","remote_port":%HTTPPORT,"response_code":200,"scheme":"HTTP","size_download":445,"size_header":4019,"size_request":4019,"size_upload":0,"speed_download":13,"speed_upload":13,"ssl_verify_result":0,"time_appconnect":0.000013,"time_connect":0.000013,"time_namelookup":0.000013,"time_pretransfer":0.000013,"time_redirect":0.000013,"time_starttransfer":0.000013,"time_total":0.000013,"url":"http://%HOSTIP:%HTTPPORT/%TESTNUMBER","url_effective":"http://%HOSTIP:%HTTPPORT/%TESTNUMBER","urlnum":0,"curl_version":"curl-unit-test-fake-version"} +