Skip to content

Initialize MvC tests #866

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

Merged
merged 12 commits into from
Feb 25, 2025
Merged

Conversation

jreynard-code
Copy link
Member

@jreynard-code jreynard-code commented Feb 14, 2025

This branch procures base code architecture to implement Controller tests.
It allows also to generate API documentation (via Spring RestDocs and openapi-generator asciidoc) under .adoc format.

  • Openapi-generator asciidoc will generate API documentation (mostly the same generated under Markdown format that can be found in the repository) but in .adoc format
  • Spring RestDocs will generate snippets (via Controller tests) under a certain folder, following openapi-generator convention, that will be integrated in main documentation

This branch contains:

  • Spring RestDocs dependency and configuration
  • Code base architecture in api module for Controller tests
  • A gradle task running openapi-generator asciidoc
  • Modified Github Action in order to run Controller Tests just after "build" step
  • Principal use case of organization endpoints

To go further, Controller Tests should be added for all modules and endpoints.

@jreynard-code jreynard-code force-pushed the JREY/add_controller_tests_configuration branch from 67026ac to 8a94440 Compare February 24, 2025 09:10
Copy link
Contributor

@lalepee lalepee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments

@jreynard-code jreynard-code force-pushed the JREY/add_controller_tests_configuration branch from ea6590d to 2a2f768 Compare February 25, 2025 13:10
- Add configuration with TestContainers
- Add simple test on organization creation
- Create a ControllerTestBase class to handle ControllerTest base configuration
- Separate Nested Organization test in a dedicated class
- Add organization_controller_test in github action build_test_package.yml
- Move *ControllerTests section with "test" step
- remove generate-doc tasks (and usage)
- remove asciidoctor dependency (useless since we use openapi generator asciidoc)
-rename generate-main-doc to generateDocumentation
@jreynard-code jreynard-code force-pushed the JREY/add_controller_tests_configuration branch from 2a2f768 to e30d669 Compare February 25, 2025 13:28
@jreynard-code jreynard-code merged commit dbb6a2c into main Feb 25, 2025
34 checks passed
@jreynard-code jreynard-code deleted the JREY/add_controller_tests_configuration branch February 25, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants