aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-copas/skip-broken-test.patch
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2019-05-17 18:45:36 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-17 18:45:36 +0000
commitc1bba6bed3f43ff4146c001ad37563e5c13b68a8 (patch)
tree3a6c3bcfc83455a071cb805f9e8cfca753aa6795 /community/lua-copas/skip-broken-test.patch
parent13eed54fc68018e8a2fbb64386d09596cb53a9b9 (diff)
downloadaports-c1bba6bed3f43ff4146c001ad37563e5c13b68a8.tar.bz2
aports-c1bba6bed3f43ff4146c001ad37563e5c13b68a8.tar.xz
community/lua-copas: skip broken test
The test verified that a http -> http redirect works. The service they used (goo.gl), started to redirect to https first, so the result is (http -> https -> http), which the library does not allow. Skip this test for now.
Diffstat (limited to 'community/lua-copas/skip-broken-test.patch')
-rw-r--r--community/lua-copas/skip-broken-test.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/community/lua-copas/skip-broken-test.patch b/community/lua-copas/skip-broken-test.patch
new file mode 100644
index 0000000000..ea48eeaf47
--- /dev/null
+++ b/community/lua-copas/skip-broken-test.patch
@@ -0,0 +1,20 @@
+diff --git a/tests/httpredirect.lua b/tests/httpredirect.lua
+index a47b42ba0f..1f23fd9e48 100644
+--- a/tests/httpredirect.lua
++++ b/tests/httpredirect.lua
+@@ -43,10 +43,11 @@ copas.addthread(function()
+ assert(headers.location == "https://github.com/brunoos/luasec")
+ print("http -> https redirect OK!")
+ copas.addthread(function()
+- local result, code, headers, status = doreq("http://goo.gl/tBfqNu") -- http --> http redirect
+- assert(tonumber(code)==200)
+- assert(headers.location == "http://www.thijsschreijer.nl/blog/")
+- print("http -> http redirect OK!")
++ -- Broken test:
++ -- local result, code, headers, status = doreq("http://goo.gl/tBfqNu") -- http --> http redirect
++ -- assert(tonumber(code)==200)
++ -- assert(headers.location == "http://www.thijsschreijer.nl/blog/")
++ -- print("http -> http redirect OK!")
+ copas.addthread(function()
+ local result, code, headers, status = doreq("https://goo.gl/tBfqNu") -- https --> http security test case
+ assert(result==nil and code == "Unallowed insecure redirect https to http")