Skip to content
Snippets Groups Projects
Commit b8fc727f authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#663 - set database type for unit tests

parent 2f3fb42e
No related branches found
No related tags found
No related merge requests found
Pipeline #6420 passed
package de.deadlocker8.budgetmaster.databasemigrator; package de.deadlocker8.budgetmaster.databasemigrator;
import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder; import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.test.JobLauncherTestUtils; import org.springframework.batch.test.JobLauncherTestUtils;
...@@ -74,6 +75,12 @@ public abstract class MigratorTestBase ...@@ -74,6 +75,12 @@ public abstract class MigratorTestBase
registry.add("spring.seconddatasource.password", postgresDB::getPassword); registry.add("spring.seconddatasource.password", postgresDB::getPassword);
} }
@BeforeAll
public static void beforeAll()
{
DatabaseMigratorMain.databaseType = DatabaseType.POSTGRESQL;
}
@TestConfiguration @TestConfiguration
static class DestinationTestDatabaseConfiguration static class DestinationTestDatabaseConfiguration
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment