Skip to content

Error in version 2.1.0 with spring-boot #143

Open
@igorr77

Description

@igorr77

Hi!
I want to use zonky in my spring-boot project to test working with postgree database. When using io.zonky.test.embedded-postgres version 1.x.x everything works fine, but postgree version is less than 13. If I specify io.zonky.test.embedded-postgres version 2.1.0 (2.x.x), I get an error

Caused by: io.zonky.test.db.config.MissingProviderDependencyException: You have to add the following dependency to your project: 'io.zonky.test:embedded-postgres'

Project settings:
java 17, spring-boot 3.2.3

zonky.test.database.type=postgres
zonky.test.database.provider=zonky    
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
<dependency
    <groupId>io.zonky.test</groupId>
    <artifactId>embedded-postgres</artifactId>
    <version>2.1.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>io.zonky.test</groupId>
    <artifactId>embedded-database-spring-test</artifactId>
    <version>2.6.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.postgresql</groupId>
    <artifactId>postgresql</artifactId>
    <version>42.7.4</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>io.zonky.test.postgres</groupId>
    <artifactId>embedded-postgres-binaries-bom</artifactId>
    <version>17.0.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
@ActiveProfiles("test")
@RunWith(SpringRunner.class)
@AutoConfigureEmbeddedDatabase
@DataJpaTest
@ContextConfiguration(classes = DomainConfig.class)
class ZonkyTest {

    @Autowired
    private TaskRepository repository;

    @Test
    void test_repository() {
        var list = repository.findAll();

        assertThat(list).isNotNull();
    }
}

Does anyone know what I'm doing wrong?
thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions