pplu / aws-sdk-perl

A community AWS SDK for Perl Programmers
Other
171 stars 94 forks source link

Failing test on t/25_error_on_malformed_response.t #228

Closed mla closed 6 years ago

mla commented 6 years ago

Install through cpanm is failing for me. Isolated it to this test:

$ prove -b t/25_error_on_malformed_response.t 
t/25_error_on_malformed_response.t .. 1/? 
#   Failed test 'threw Paws::Exception'
#   at t/25_error_on_malformed_response.t line 105.
# expecting: Paws::Exception
# found: Moose::Exception::ValidationFailedForTypeConstraint (Attribute (message) does not pass the type constraint because: Validation failed for '__ANON__' with value XML::LibXML::Error=HASH(0x3f38e08) at /home/mla/perl5/lib/perl5/x86_64-linux/Moose/Meta/Class.pm line 275
#   Moose::Meta::Class::new_object at (eval 366) line 20
#   Throwable::Error::new at /home/mla/.cpanm/work/1523562771.13503/Paws-0.36/blib/lib/Paws/Net/XMLResponse.pm line 32
#   Paws::Net::XMLResponse::error_to_exception at /home/mla/.cpanm/work/1523562771.13503/Paws-0.36/blib/lib/Paws/Net/XMLResponse.pm line 20
#   Paws::Net::XMLResponse::handle_response at t/lib/TestGivenResponse.pm line 29
#   TestGivenResponse::caller_to_response at t/lib/TestGivenResponse.pm line 14
#   TestGivenResponse::do_call at t/lib/Paws/QueryParamsService.pm line 32
#   Paws::QueryParamsService::Method3 at t/25_error_on_malformed_response.t line 103
#   Test::Exception::throws_ok at t/25_error_on_malformed_response.t line 105
# )
Can't locate object method "code" via package "Moose::Exception::ValidationFailedForTypeConstraint" at t/25_error_on_malformed_response.t line 107.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 37.

I'm sure it's probably a module that's out of date or something. Tried upgrading Moose, XML::LibXML, etc. to the latest. Still the same error.

Using perl 5.18.2 through plenv but also tried 5.27.4.

Any ideas?

mla commented 6 years ago

Was due to XML::Simple 2.20. 2.21 fixes it. Pull request created: https://github.com/pplu/aws-sdk-perl/pull/229

pplu commented 6 years ago

Thank you for your fix! I'll keep this bug open until Paws 0.37 hits CPAN just in case anybody runs into the same problem as you.

pplu commented 6 years ago

Paws 0.37 with this change has just been uploaded to CPAN