From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Alexander Turenko Subject: [PATCH] test: fix http_client.test.lua with curl-7.62 Date: Sun, 2 Dec 2018 18:52:09 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: Vladimir Davydov Cc: Alexander Turenko , tarantool-patches@freelists.org List-ID: curl-7.61.1 ``` tarantool> require('http.client').new():get('http://localhost:0') --- - status: 595 reason: Couldn't connect to server ``` curl-7.62 ``` tarantool> require('http.client').new():get('http://localhost:0') --- - error: 'curl: URL using bad/illegal format or missing URL' ... ``` curl-7.62 returns CURLE_URL_MALFORMAT is case of zero port and tarantool raises an error in the case. I think this behaviour is valid, so I fixed the test. --- no issue https://github.com/tarantool/tarantool/tree/Totktonada/fix-http-client-test The branch is based on 2.1. Please, cherry-pick it also to 1.10. test/app-tap/http_client.test.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/app-tap/http_client.test.lua b/test/app-tap/http_client.test.lua index 90ea51b3a..10a3728f8 100755 --- a/test/app-tap/http_client.test.lua +++ b/test/app-tap/http_client.test.lua @@ -73,7 +73,7 @@ local function test_http_client(test, url, opts) test:ok(r.body:match("hello") ~= nil, "body") test:ok(tonumber(r.headers["content-length"]) > 0, "content-length > 0") - test:is(client.get("http://localhost:0/").status, 595, 'bad url') + test:is(client.get("http://localhost:1/").status, 595, 'cannot connect') local r = client.request('GET', url, nil, opts) test:is(r.status, 200, 'request') -- 2.19.2