Search in sources :

Example 1 with BlockSnapshotSessionMigration

use of com.emc.storageos.db.client.upgrade.callbacks.BlockSnapshotSessionMigration in project coprhd-controller by CoprHD.

the class BlockSnapshotSessionMigrationTest method setup.

/**
 * Setup method executed before test is executed.
 *
 * @throws IOException
 */
@BeforeClass
public static void setup() throws IOException {
    customMigrationCallbacks.put("2.4", new ArrayList<BaseCustomMigrationCallback>() {

        private static final long serialVersionUID = 1L;

        {
            // Add your implementation of migration callback below.
            add(new BlockSnapshotSessionMigration());
        }
    });
    // Adding this, which is typically executed in the base class
    // call, as it is needed to clear the DB file between runs.
    _dataDir = new File(dataDir);
    if (_dataDir.exists() && _dataDir.isDirectory()) {
        cleanDirectory(_dataDir);
    }
    _dataDir.mkdir();
// Commenting this out as it prevents the migration callback
// from being executed when the test is executed.
// DbsvcTestBase.setup();
}
Also used : BaseCustomMigrationCallback(com.emc.storageos.db.client.upgrade.BaseCustomMigrationCallback) BlockSnapshotSessionMigration(com.emc.storageos.db.client.upgrade.callbacks.BlockSnapshotSessionMigration) File(java.io.File) BeforeClass(org.junit.BeforeClass)

Aggregations

BaseCustomMigrationCallback (com.emc.storageos.db.client.upgrade.BaseCustomMigrationCallback)1 BlockSnapshotSessionMigration (com.emc.storageos.db.client.upgrade.callbacks.BlockSnapshotSessionMigration)1 File (java.io.File)1 BeforeClass (org.junit.BeforeClass)1