* [PATCH] test: fix http_client.test.lua with curl-7.62
@ 2018-12-02 15:52 Alexander Turenko
2018-12-03 8:42 ` Vladimir Davydov
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Turenko @ 2018-12-02 15:52 UTC (permalink / raw)
To: Vladimir Davydov; +Cc: Alexander Turenko, tarantool-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] test: fix http_client.test.lua with curl-7.62
2018-12-02 15:52 [PATCH] test: fix http_client.test.lua with curl-7.62 Alexander Turenko
@ 2018-12-03 8:42 ` Vladimir Davydov
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Davydov @ 2018-12-03 8:42 UTC (permalink / raw)
To: Alexander Turenko; +Cc: tarantool-patches
On Sun, Dec 02, 2018 at 06:52:09PM +0300, Alexander Turenko wrote:
> 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.
Pushed to 2.1 and 1.10.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-03 8:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-02 15:52 [PATCH] test: fix http_client.test.lua with curl-7.62 Alexander Turenko
2018-12-03 8:42 ` Vladimir Davydov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox