|
|
|
@ -5,6 +5,7 @@ import java.io.IOException;
|
|
|
|
|
import org.gcube.informationsystem.context.impl.entities.ContextImpl;
|
|
|
|
|
import org.gcube.informationsystem.context.reference.entities.Context;
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.contexts.ContextCreator;
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.contexts.entities.ContextManagement;
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.dbinitialization.DatabaseEnvironment;
|
|
|
|
|
import org.gcube.informationsystem.utils.ElementMapper;
|
|
|
|
@ -18,9 +19,15 @@ public class DataBaseCreator extends ContextTest {
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
public void createDatabase() throws Exception {
|
|
|
|
|
ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE);
|
|
|
|
|
|
|
|
|
|
logger.debug("Going to create DB");
|
|
|
|
|
String db = DatabaseEnvironment.DB_URI;
|
|
|
|
|
logger.debug("{} created", db);
|
|
|
|
|
|
|
|
|
|
ContextCreator contextCreator = new ContextCreator();
|
|
|
|
|
contextCreator.all();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected Context create(Context context) throws ResourceRegistryException, IOException {
|
|
|
|
|