byterock / mojolicious-plugin-authorization

A plugin to make Authorization a bit easier
Other
9 stars 8 forks source link

t/04-full_fat_app.t fails #19

Open eserte opened 2 years ago

eserte commented 2 years ago

On some of my smoker systems, probably with recent Mojolicious versions, the test suite fails like this:

Mojo::Reactor::EV: I/O watcher failed: A response has already been rendered at /opt/perl-5.34.0t/lib/site_perl/5.34.0/Mojolicious/Controller.pm line 154.
# Premature connection close

#   Failed test 'GET /cake/eat'
#   at t/04-full_fat_app.t line 85.

#   Failed test '401 Unauthorized'
#   at t/04-full_fat_app.t line 85.
#          got: undef
#     expected: '401'

#   Failed test 'is_role failure renders custom response'
#   at t/04-full_fat_app.t line 87.
# Compared reftype($data)
#    got : undef
# expect : 'HASH'
# Looks like you failed 3 tests of 12.
t/04-full_fat_app.t ....... 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/12 subtests 
byterock commented 2 years ago

Hmm will have to look into that what is the typical config of your smoker boxes?

eserte commented 2 years ago

There's no typical configuration. It's various FreeBSD VMs (12, 13, 14) and Linux VMs (Debian, Ubuntu, Fedora, CentOS), with perl versions ranging from 5.8.9 to 5.35.11.

Maybe it's just enough to try it with the latest Mojolicious 9.25 installed.

gmorten1 commented 1 year ago

these tests fail on mojo 9.31 because the "any" route for /cake/eat is declared twice (identically), which i assume was unintentional. fix is delete lines 42-46.

nicky-ayoub commented 1 month ago

these tests fail on mojo 9.31 because the "any" route for /cake/eat is declared twice (identically), which i assume was unintentional. fix is delete lines 42-46.

I added a pull request that implements this. It would help my automated builds