Class TestLiquibaseRunner

java.lang.Object
no.priv.bang.ukelonn.db.liquibase.test.TestLiquibaseRunner
All Implemented Interfaces:
org.ops4j.pax.jdbc.hook.PreHook

public class TestLiquibaseRunner extends Object implements org.ops4j.pax.jdbc.hook.PreHook
  • Field Details

    • DEFAULT_DUMMY_DATA_CHANGELOG

      static final String DEFAULT_DUMMY_DATA_CHANGELOG
      See Also:
    • logger

      private org.osgi.service.log.Logger logger
    • databaselanguage

      private String databaselanguage
  • Constructor Details

    • TestLiquibaseRunner

      public TestLiquibaseRunner()
  • Method Details

    • setLogService

      public void setLogService(org.osgi.service.log.LogService logService)
    • activate

      public void activate(Map<String,Object> config)
    • prepare

      public void prepare(DataSource datasource) throws SQLException
      Specified by:
      prepare in interface org.ops4j.pax.jdbc.hook.PreHook
      Throws:
      SQLException
    • insertMockData

      public boolean insertMockData(DataSource datasource, no.priv.bang.ukelonn.db.liquibase.UkelonnLiquibase liquibase)
    • rollbackMockData

      public boolean rollbackMockData(DataSource datasource)
    • getChangeLogHistory

      List<liquibase.changelog.RanChangeSet> getChangeLogHistory(DataSource datasource) throws liquibase.exception.DatabaseException, SQLException
      Package private method to let the unit test determine if the Liquibase changesets have been run.
      Returns:
      A list of all changesets run by liqubase in the derby database
      Throws:
      liquibase.exception.DatabaseException
      SQLException
    • findCorrectDatabaseImplementation

      private liquibase.database.Database findCorrectDatabaseImplementation(liquibase.database.jvm.JdbcConnection databaseConnection) throws liquibase.exception.DatabaseException
      Throws:
      liquibase.exception.DatabaseException
    • findChangeLogService

      private liquibase.changelog.ChangeLogHistoryService findChangeLogService(liquibase.database.Database database)
    • dummyDataResourceName

      String dummyDataResourceName()