Reputation: 889
Just wanted to download one module:
sudo cpan HTTP::SimpleLinkChecker
but while watching outputs, and error returned.
t/200.t ............ Link is http://blogs.perl.org/
t/200.t ............ 1/? Link is https://www.perl.org/
t/200.t ............ ok
t/403.t ............ Link is http://www.pair.com/comdog/cgi-bin/403.cgi
t/403.t ............ 1/1
# Failed test 'Unauthorized code works'
# at t/403.t line 9.
# got: '200'
# expected: '403'
But what does mean Unauthorized code works
? Even if I made it with sudo
privileges.
And second question, what can tell me those pieces -> t/200.t
or t/200.t
in testing? At the end of the dots are some links, but how is it connected together?
Moreover the cpanm
is recommending me to install with --force
option, which mean to neglect the tests, but if I do so, what would be the consequences? Would it mean the module is broken? So it can break my own script when using it?
Upvotes: 0
Views: 106
Reputation: 8693
*.t
are the actual test files that Perl runs, and names like Unauthorized code works are individual tests (methods). The output at the end (e.g., "Link is...") is just something the test printed to stderr
.
The source code for HTTP::SimpleLinkChecker is on Github, and looking at the tests, the unit tests actually try to connect to some server (oh my...). That server is http://www.pair.com/comdog/cgi-bin/403.cgi. When I wget
that, I also get a 200 OK HTTP code, as your test does, but the test expected a 403, and hence it fails.
Bottom line: report a bug with brian d foy, the maintainer of that Perl module (you can probably use the Github link above).
It's up to you if you want to --force
to install the module. Forcing means to ignore the failing tests and install anyway. This one is probably just a harmless unit test failure, but I'd be suspicious if other tests fail in different ways.
Upvotes: 4