Closed 4d47 closed 5 years ago
The test should only run if IO::Socket::SSL is installed
On 1 October 2016 at 15:14, Mathieu Gagnon notifications@github.com wrote:
Got this when trying to installed:
Failed test 'can retrieve http://github.com/'
at t/issue-7.t line 8
501 Protocol scheme 'https' is only supported if IO::Socket::SSL is installed URL:https://github.com/
Maybe IO::Socket::SSL should be added as a "test-depends"
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/perl6/perl6-lwp-simple/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/AEUuYyITJNVo3ZlYGaJoV4F6qs0xAI0aks5qvmrAgaJpZM4KLw2Z .
4096R/EA75174B Steve Mynott steve.mynott@gmail.com
This appears to be fixed by a9b891fae1702625545d2991153d9ea0e2835471
It's not:
===> Testing: LWP::Simple:ver<0.097>:auth<Cosimo Streppone>
501 Protocol scheme 'https' is only supported if IO::Socket::SSL is installed <URL:https://rakudo.org/>
in method request_shell at /root/.zef/store/perl6-lwp-simple.git/afc54b994fdd6e479404d59112c7b69eee3b90ea/lib/LWP/Simple.pm (LWP::Simple) line 55
in block at /root/.zef/store/perl6-lwp-simple.git/afc54b994fdd6e479404d59112c7b69eee3b90ea/lib/LWP/Simple.pm (LWP::Simple) line 109
in method request_shell at /root/.zef/store/perl6-lwp-simple.git/afc54b994fdd6e479404d59112c7b69eee3b90ea/lib/LWP/Simple.pm (LWP::Simple) line 94
in method get at /root/.zef/store/perl6-lwp-simple.git/afc54b994fdd6e479404d59112c7b69eee3b90ea/lib/LWP/Simple.pm (LWP::Simple) line 31
in block <unit> at t/get-unsized.t line 16
===> Testing [FAIL]: LWP::Simple:ver<0.097>:auth<Cosimo Streppone>
This isn't a good way to fix this issue.
You're still requiring users to install IO::Socket::SSL (which will fail if libssl isn't present) and the only difference is you're tossing the module away at the end of testing instead of installing it.
This module is also part of Rakudo Star, while IO::Socket::SSL isn't.
What's the alternative? Adding more "skips"? That means that SSL code is not going to be tested. Anyway, I see you have self-assigned it, so I guess you'll propose one.
I don't particularly like the idea of skipping SSL-related code, but I guess that it's probably worse than having users intall a non-needed module. Anyway, as you say, it's a test dependency. IO::Socket::SSL can be installed while creating the Rakudo Star distro and then ditched (which it will be automatically anyway, since it's installed only for testing)
skipping SSL-related code,
It isn't SSL related test. It just started failing because the author used rakudo.org for testing, which now forces SSL
installed while creating the Rakudo Star
Users are offered to run tests while installing it, which will fail without the module.
2018-04-15 12:17 GMT+02:00 Zoffix Znet notifications@github.com:
skipping SSL-related code,
It isn't SSL related test. It just started failing because the author used rakudo.org for testing, which now forces SSL
I fixed the size, BTW. Most sites force SSL nowadays, anyway.
This error just showed up again https://travis-ci.org/perl6/doc/jobs/372142493
Apparently httpbin has decided to redirect everything to https
This URL: http://no-ssl-http-module-tester.perl6.org' is now also redirected to https://perl6.org. I don't really think it's a good solution to keep creating eventually temporary servers for testing. Plus this module should support IO::Socket::SSL, even in Windows...
This is related to #26 #30
https://modules.perl6.org/dist/Test::HTTP::Server:cpan:SCIMON ?
I can look at implementing it for these tests today. Depends on if we need to be testing an external server or if we are ok testing on localhost.
@Scimon that could be a good solution, but anyhow I think that deprecating this would probably be the way to go, since it's been transitioned to HTTP::UserAgent nowadays. And no, I fail to see how and why we would need an external server.
Commented elsewhere. Test::HTTP::Server has IO::Socket::SSL as a downstream dependeny so isn't going to work.
Got this when trying to install:
Maybe
IO::Socket::SSL
should be added as a "test-depends"