geofffranks / json-api

A perl module to simplify interaction with JSON APIs
Other
6 stars 6 forks source link

test errors on ubuntu 20.04 #8

Open quimpg opened 3 years ago

quimpg commented 3 years ago

I got several errors when I try to install the package on ubuntu 20.04

Any idea of the reason?

t/core.t ...... 1/? Failed test 'Invalid object sent for serialization returns undef' at t/core.t line 54. got: '"asdf"' expected: undef Failed test 'Bad encode sets proper errstr' at t/core.t line 55. got: '' expected: 'hash- or arrayref expected (not a simple scalar, use allow_nonref to allow this)' Looks like you failed 2 tests of 24. t/core.t ...... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/24 subtests

t/requests.t .. 1/? Failed test 'Scalar context for /put_invalid_json bails before request' at t/requests.t line 17. Structures begin differing at: $got->{code} = 'success' $expected->{code} = Does not exist

Failed test 'List context HTTP Code for /put_invalid_json bails before request should return 500' at t/requests.t line 19. got: '200' expected: '500' Failed test 'List context response for /put_invalid_json bails before request' at t/requests.t line 20. Structures begin differing at: $got->{code} = 'success' $expected->{code} = Does not exist Looks like you failed 3 tests of 35. t/requests.t .. Dubious, test returned 3 (wstat 768, 0x300)

Ovid commented 2 years ago

I'm getting the same errors on macOS Monterey, version 12.4. Perl version 5.26.3.

eritain commented 1 year ago

Same here, Ubuntu Xenial, Perl 5.22.

These tests expect that JSON->to_json() will refuse to encode a bare string, but it does that now, so they break.

eritain commented 1 year ago

This is #4 again.