-
Issue descriptionHi there. I'm using Micronaut Data in my application, but I would like to disable the Datasource for certain tests I have annotated with @MicronautTest. I haven't seen anything like that in the docs, where the suggested approach is to use a DB such as H2. In my particular case, what I'm testing right now doesn't use the DB at all, but it still requires it if I want to use the Micronaut context to use its real dependencies (which, in turn, are not DB-related). I would like to achieve something similar to test slices that can be achieved with Spring Boot so that I can use a context but without a DB (for certain tests). Is that even possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
I am moving this issue to Micronaut Data. One option is to remove |
Beta Was this translation helpful? Give feedback.
-
I created an issue to enable programmatic disabling #2893 |
Beta Was this translation helpful? Give feedback.
Yes, move everything datasource related to outside of
application.properties
.In the test which use persistence annotate them with
and have:
application-dev.properties
to run the app locally with datasource …