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

[BUG][Perl] Tests are failing #14921

Closed
4 of 6 tasks
hidden-primary-net opened this issue Mar 10, 2023 · 0 comments
Closed
4 of 6 tasks

[BUG][Perl] Tests are failing #14921

hidden-primary-net opened this issue Mar 10, 2023 · 0 comments

Comments

@hidden-primary-net
Copy link

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

The perl tests in samples/client/petstore/perl fail for a trivial reason, e.g.

$ prove -l t/AdditionalPropertiesClassTest.t
t/AdditionalPropertiesClassTest.t .. 1/2 # Looks like you planned 2 tests but ran 1.
t/AdditionalPropertiesClassTest.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/2 subtests 

Test Summary Report
-------------------
t/AdditionalPropertiesClassTest.t (Wstat: 65280 Tests: 1 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 2 tests but ran 1.
Files=1, Tests=1,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.13 cusr  0.01 csys =  0.15 CPU)
Result: FAIL
openapi-generator version

I can reproduce it with the current HEAD 140d941.

OpenAPI declaration file content or url
Generation Details

No generation steps need to be taken, only the repo needs to be cloned.

Steps to reproduce
cd samples/client/petstore/perl && prove -l
Related issues/PRs

n/a

Suggest a fix

I'd be happy to take care for this issue and submit a small template fix to make the tests pass.

hidden-primary-net added a commit to hidden-primary-net/openapi-generator that referenced this issue Mar 10, 2023
Steps to reproduce:

* update modules/openapi-generator/src/main/resources/perl/api_test.mustache
  and modules/openapi-generator/src/main/resources/perl/object_test.mustache
  properly
* regenerate code generator
* remove test files
* update test files

    ##  doesn't finish with openjdk-19 without -D...
    mvn clean package -DskipTests -Dmaven.javadoc.skip=true

    rm samples/client/petstore/perl/t/*Test.t

    ./bin/generate-samples.sh ./bin/configs/perl*

Now the tests pass.
bmodotdev pushed a commit to bmodotdev/openapi-generator that referenced this issue Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant