jhthorsen / openapi-client

A client for talking to an Open API powered server
11 stars 17 forks source link

Tests fail (with newest Mojolicious::Plugin::OpenAPI?) #15

Closed eserte closed 5 years ago

eserte commented 5 years ago

The test suite fails on some of my smokers:

...
#   Failed test 'valid loginUser'
#   at t/body-validation.t line 30.
#          got: '501'
#     expected: '200'

#   Failed test 'valid return'
#   at t/body-validation.t line 31.
#          got: undef
#     expected: 'superman@example.com'

#   Failed test 'only sent data to server once'
#   at t/body-validation.t line 42.
#          got: '0'
#     expected: '1'
# Looks like you failed 3 tests of 10.
t/body-validation.t ......... 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/10 subtests 
... (etc) ...

This seems to happen if Mojolicious::Plugin::OpenAPI 2.x is installed:

****************************************************************
Regression 'mod:Mojolicious::Plugin::OpenAPI'
****************************************************************
Name                   Theta          StdErr     T-stat
[0='const']           1.0000          0.0000    5791088394397843.00
[1='eq_1.26']         0.0000          0.0000       1.36
[2='eq_1.28']         0.0000          0.0000       1.11
[3='eq_1.30']         0.0000          0.0000       1.27
[4='eq_2.00']        -1.0000          0.0000    -5752862970752844.00

R^2= 1.000, N= 119, K= 5
****************************************************************
dexteruk commented 5 years ago

Yes, i have the same issue, downgrading to 1.30

cpanm install Mojolicious::Plugin::OpenAPI@1.30

fixed the issue

Below is the log dump from the tests.

#   Failed test 'valid loginUser'
#   at t/body-validation.t line 30.
#          got: '501'
#     expected: '200'

#   Failed test 'valid return'
#   at t/body-validation.t line 31.
#          got: undef
#     expected: 'superman@example.com'

#   Failed test 'only sent data to server once'
#   at t/body-validation.t line 42.
#          got: '0'
#     expected: '1'
# Looks like you failed 3 tests of 10.
t/body-validation.t ......... 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/10 subtests 

#   Failed test 'sync listPets'
#   at t/client.t line 51.
#          got: '501'
#     expected: '200'

#   Failed test 'one request'
#   at t/client.t line 53.
#          got: '0'
#     expected: '1'
# Looks like you failed 2 tests of 25.
t/client.t .................. 

Dubious, test returned 2 (wstat 512, 0x200) Failed 2/25 subtests t/command-local-with-ref.t .. skipped: [OpenAPI] Could not find route by name 'dummy'. at /home/node/perl5/perlbrew/perls/perl-5.24.3/lib/site_perl/5.24.3/Mojolicious/Plugin/OpenAPI.pm line 104.

jhthorsen commented 5 years ago

Thanks for reporting in 👍

@dexteruk: What added value did your comment have..? Not sure if I missed out on anything or not...

dexteruk commented 5 years ago

Hi @jhthorsen

I will test it and let you know if there was any more problems.

Thanks for the quick fix.

Craig