From: Alexander Turenko <alexander.turenko@tarantool.org> To: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Alexander Turenko <alexander.turenko@tarantool.org>, tarantool-patches@freelists.org Subject: [PATCH] test: fix http_client.test.lua with curl-7.62 Date: Sun, 2 Dec 2018 18:52:09 +0300 [thread overview] Message-ID: <d415e65407f413faa3320be6c63e220e38fa12f8.1543765320.git.alexander.turenko@tarantool.org> (raw) 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
next reply other threads:[~2018-12-02 15:52 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-02 15:52 Alexander Turenko [this message] 2018-12-03 8:42 ` Vladimir Davydov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=d415e65407f413faa3320be6c63e220e38fa12f8.1543765320.git.alexander.turenko@tarantool.org \ --to=alexander.turenko@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH] test: fix http_client.test.lua with curl-7.62' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox