Skip to content

Commit

Permalink
Read profile with override for java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
zapodot committed Jul 11, 2024
1 parent daff167 commit 6d447d6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
15 changes: 15 additions & 0 deletions embedded-db-flyway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>add-flyway-hsqldb-module</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-hsqldb</artifactId>
<version>${flyway.version}</version>
</dependency>
</dependencies>
</profile>
</profiles>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.zapodot.junit.db.plugin;

import com.google.common.collect.ImmutableMap;
import org.flywaydb.core.internal.license.FlywayTeamsUpgradeRequiredException;
import org.junit.Test;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import java.nio.charset.StandardCharsets;

import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;

public class FlywayInitializerCheckConfigurationTest {

Expand All @@ -22,6 +22,7 @@ public class FlywayInitializerCheckConfigurationTest {
public static final String TARGET_VERSION = "2";
public static final String LOCATION = "classpath:placeholder";

@DisplayName("Test builder")
@Test
public void testBuilder() {
final FlywayInitializer flywayInitializer = new FlywayInitializer.Builder().withInstalledBy(INSTALLED_BY)
Expand Down Expand Up @@ -56,14 +57,4 @@ public void testBuilder() {

}

@Test
public void ignorePatterns() {
assertThrows(FlywayTeamsUpgradeRequiredException.class, () ->
FlywayInitializer.builder().withIgnoreMissingMigrations()
);

assertThrows(FlywayTeamsUpgradeRequiredException.class, () ->
FlywayInitializer.builder().withIgnoreMigrationPatterns("repeatable:missing")
);
}
}
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
</activation>
<properties>
<spring-jdbc.version>5.3.37</spring-jdbc.version>
<flyway.version>9.22.3</flyway.version>
</properties>
</profile>
<profile>
Expand Down

0 comments on commit 6d447d6

Please sign in to comment.