Search code examples
unit-testingquarkus

How to override config property for one Unittest in Quarkus


In my Quarkus-Application an Observer of StartupEvent inserts default data into my database if a specific config-property is true. For one particular UnitTest I want my database to be empty.

I would think that there is some way to override configuration values for one unittest. Is that true, or is there a better way?


Solution

  • I would suggest using test profiles

    https://quarkus.io/blog/quarkus-test-profiles/