From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id CC4E52BD6F for ; Wed, 24 Apr 2019 06:57:16 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aR_2A2xxxyp1 for ; Wed, 24 Apr 2019 06:57:16 -0400 (EDT) Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 240A42BD67 for ; Wed, 24 Apr 2019 06:57:16 -0400 (EDT) From: Alexander Turenko Subject: [tarantool-patches] [PATCH] httpc: temporary disable redirecting test case Date: Wed, 24 Apr 2019 13:57:03 +0300 Message-Id: <4cc6978ae7be7dc3785a52c064b07850582522de.1556103299.git.alexander.turenko@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Kirill Yukhin Cc: Alexander Turenko , tarantool-patches@freelists.org Redirects can work improperly with libcurl-7.30 and older. CentOS 7 provides libcurl-7.29, so app-tap/http_client.test.lua fails on the corresponding test case in CI. We need to disable the test case until #4180 will be resolved. While we are here fixed httpd.py to write a response at once, not char-by-char (the typo from daf1ced8). See gevent/pywsgy.py::process_result(). Related to #4119 and #4180. --- It is needed on master and 2.1 to prevents CI fails. The test case should be enabled back after #4180. https://github.com/tarantool/tarantool/issues/4180 https://github.com/tarantool/tarantool/tree/Totktonada/gh-4180-httpc-disable-redirecting-test-case test/app-tap/http_client.test.lua | 6 +++++- test/app-tap/httpd.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/app-tap/http_client.test.lua b/test/app-tap/http_client.test.lua index 413fc3400..4eee21ebb 100755 --- a/test/app-tap/http_client.test.lua +++ b/test/app-tap/http_client.test.lua @@ -62,7 +62,7 @@ local function stop_server(test, server) end local function test_http_client(test, url, opts) - test:plan(12) + test:plan(11) -- gh-4136: confusing httpc usage error message local ok, err = pcall(client.request, client) @@ -85,6 +85,9 @@ local function test_http_client(test, url, opts) local r = client.request('GET', url, nil, opts) test:is(r.status, 200, 'request') + -- XXX: enable after resolving of gh-4180: httpc: redirects + -- are broken with libcurl-7.30 and older + --[[ -- gh-4119: specify whether to follow 'Location' header test:test('gh-4119: follow location', function(test) test:plan(7) @@ -108,6 +111,7 @@ local function test_http_client(test, url, opts) test:is(r.body, 'redirecting', 'do not follow location: body') test:is(r.headers['location'], '/', 'do not follow location: header') end) + ]]-- end -- diff --git a/test/app-tap/httpd.py b/test/app-tap/httpd.py index dbfddfdd8..b4662bc1f 100755 --- a/test/app-tap/httpd.py +++ b/test/app-tap/httpd.py @@ -47,7 +47,7 @@ def long_query(): def redirect(): code = "302 Found" - body = "redirecting" + body = ["redirecting"] headers = [('Location', '/')] return code, body, headers -- 2.21.0