Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail (with recent Mojolicious versions?) #37

Closed
eserte opened this issue Jan 12, 2017 · 1 comment
Closed

Tests fail (with recent Mojolicious versions?) #37

eserte opened this issue Jan 12, 2017 · 1 comment
Labels

Comments

@eserte
Copy link

eserte commented Jan 12, 2017

The t/allow_origin.t test started to fail on my smokers:

Configuration file "/home/cpansand/.cpan/build/2017011206/Mercury-0.011-0/blib/t/share/allow_origin.conf" missing, maybe you need to create it?
t/allow_origin.t ....... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 

Statistical analysis suggests that this happens with newer Mojolicious versions:

****************************************************************
Regression 'mod:Mojolicious'
****************************************************************
Name           	       Theta	      StdErr	 T-stat
[0='const']    	      1.0000	      0.0000	68259441348862224.00
[1='eq_7.10']  	      0.0000	      0.0000	   4.92
[2='eq_7.11']  	      0.0000	      0.0000	   6.99
[3='eq_7.12']  	      0.0000	      0.0000	   3.79
[4='eq_7.14']  	      0.0000	      0.0000	   4.79
[5='eq_7.18']  	     -1.0000	      0.0000	-57109946010140240.00

R^2= 1.000, N= 39, K= 6
****************************************************************
@preaction
Copy link
Owner

This does seem to be tangentially-related to the Mojolicious change in 7.18 which adds the new Mojo::File API, but it seems more to be one of those things where it accidentally worked in the Mercury test, and it should indeed never have worked correctly: Mojolicious::Plugin::Config has always looked for config files "relative to the application home directory" (unless they were absolute paths). That somehow the test worked before this is surprising (and incorrect), though why I was unable to reproduce it using my standard dev environment was obvious (given an app module path of lib/Mercury.pm, the "home" directory gets set to lib/.., which meant that t/share/allow_origin.conf was correct).

So, this is an easy fix, and I'll have a new release out shortly. Thanks for the report and the analysis!

@preaction preaction added the bug label Jan 13, 2017
preaction added a commit that referenced this issue Jan 13, 2017
    [Fixed]

    - Fixed allow_origin.t test failing on new versions of Mojolicious
      due to an invalid assumption in the test. Previously it was
      accidentally working, now it is deliberately working. Thanks
      @eserte for the report! [Github #37]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants