java – Problems with connecting H2 database for testing in spring boot
[*] I want to connect h2 database to my test for JPA repository testing, but I am getting an error and don’t understand where it comes from. My test: @DataJpaTest class RepositoryTest{ @Autowired lateinit var entityManager: TestEntityManager @Autowired lateinit var dataSource: DataSource @Autowired lateinit var repository: Repository @Test fun `context loads`(){ Assertions.assertNotNull(entityManager) Assertions.assertNotNull(dataSource) } } … Read more