openapi-tools / swagger-maven-plugin

Maven plugin to activate the Swagger Core library to generate OpenAPI documentation.
MIT License
70 stars 45 forks source link

Add integration test to the Issue #25 #29

Closed tosix1988 closed 4 years ago

tosix1988 commented 5 years ago

This pull request adds the integration test to the problem fixed in Issue #25.

As this problem heavily depends on maven classloading, ordinary IT is not an option for this case (at least I was not able to do it properly). Therefore, the integration test is performed by maven invoker plugin, which essentially takes a sample project and invokes specific maven goals on it (sample projects are located in stc/it, as this seems to be the maven invoker default option). The advantage is that the environment is exactly the same as with standard maven build.

The invoker ITs are only active if the "run-its" maven profile is activated. I did not alter your travis build in any way, so nothing should happen during the current travis build at this moment.

This pull request is a side effect of my attempt to fix Issue #25, and I thought you might find it useful. If you would like to take it or adapt it somehow, the thing to do here is probably to adjust the travis build to activate the "run-its" profile.

langecode commented 5 years ago

Sorry, haven't forgot this just been incredibly busy at work. Thanks for making the integration test setup more robust - it really was a problem the tests running in the same VM as the build. Will get back as soon as possible.

langecode commented 4 years ago

Finally got this merged.. Once again thanks for the contribution..