We’ve got the following setup:
- parent
- service + orm (lib)
- processor (jberet, quarkus deployable)
- api v2 (REST, quarkus deployable)
- api v3 (REST, quarkus deployable, to-be)
- app (quinoa, quarkus deployable)
The service encompasses the business logic (service) + the object-relational-model used by all other deployables (Quarkus applications) that run in their own pod’s. We are using Panache and Panache-mock to unit test.
However, we run into the problem that it seems we need to annotate the tests in the service
lib with @QuarkusTest
in order to test. That requires application.properties
and the Quarkus plugin
and basically spins up a Quarkus application.
Is there a way around this? So not making the lib project de-facto a Quarkus application?
Note: only putting an application.properties
in the test
folder will most likely work. But it would be nice if we could Panache + Panache-mock without a need to start Quarkus.
Moreover, we try to keep the access layers in the Quarkus applications thin
. So just map from REST to Service and mock the Service classes in unit test in the Quarkus application, so in essence following a tiered architecture in which the Quarkus applications form the Access-tier
or Presentation-tier
only and where the Business-tier
is respectively implemented in the service module (service
package) and the Data-tier
is respectively also implemented in the service module (orm
package)