Skip to content

Instantly share code, notes, and snippets.

@mks-d
Created July 13, 2018 21:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mks-d/64551ddea6e016a8bbd7c24d3cc6e535 to your computer and use it in GitHub Desktop.
Save mks-d/64551ddea6e016a8bbd7c24d3cc6e535 to your computer and use it in GitHub Desktop.
Context sensitive test for OpenMRS Liquibase migrations
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