Fixed test to create the whole DB

This commit is contained in:
Luca Frosini 2020-07-03 15:17:35 +02:00
parent 276a85c778
commit a6a944013a
1 changed files with 7 additions and 0 deletions

View File

@ -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 {