lundi 3 juin 2019

How to perform unit tests with h2 database where bpchar is used?

I have a spring + hibernate application that uses postgres database. I need to write unit tests for the controllers. For tests I wanted to use h2 database but unfortunately test crashes during create-drop leaving me with information that bpchar data type is invalid. I wonder how to solve this issue so I could run tests.

I can't change my columns with bpchar to varchar, it need to stay as it is. I also tried to set postgresql mode but it didn't helped. Am I right that the only solution I have is to use embedded postgres database in order to perform tests or is there any other approach that I could use?

Aucun commentaire:

Enregistrer un commentaire