Created
July 13, 2018 21:58
-
-
Save mks-d/64551ddea6e016a8bbd7c24d3cc6e535 to your computer and use it in GitHub Desktop.
Context sensitive test for OpenMRS Liquibase migrations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LiquibaseMigrationTest extends BaseModuleContextSensitiveTest { | |
public LiquibaseMigrationTest() { | |
super(); | |
Properties props = getRuntimeProperties(); | |
if (useInMemoryDatabase()) { | |
String url = "jdbc:h2:mem:openmrs;DB_CLOSE_DELAY=30;LOCK_TIMEOUT=10000;LOCK_MODE=0"; | |
props.setProperty(Environment.URL, url); | |
} | |
Context.setRuntimeProperties(props); | |
} | |
@Test | |
public void testMigration() throws DatabaseUpdateException, InputRequiredException { | |
DatabaseUpdater.executeChangelog("liquibase.xml", null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment