Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src
README.md
pom.xml

README.md

embedded-db-junit-liquibase

Liquibase initializer to be used with the Embedded DB JUnit Rule. When added as a plugin i runs the Liquibase update target after the in-memory H2 database has been created. This allows you to write tests for your real world database schema without affecting your real database

Add to project

Maven

<dependency>
    <groupId>org.zapodot</groupId>
    <artifactId>embedded-db-junit-liquibase</artifactId>
    <version>ADD_VERSION</version>
    <scope>test</scope>
</dependency>

Add plugin to your the @Rule

@Rule
public EmbeddedDatabaseRule embeddedDatabaseRule = EmbeddedDatabaseRule
        .builder()
        .withMode(CompatibilityMode.MSSQLServer)
        .initializedByPlugin(LiquibaseInitializer.builder()
                .withChangelogResource("example-changelog.sql")
                .withContexts("addUsersAndRoles")
                .build())
        .build();

The fluent builder API contains numerous methods that let you control various parameters that are provided to Liquibase.

Analytics

You can’t perform that action at this time.