Fixed tests

This commit is contained in:
Luca Frosini 2024-11-04 16:13:05 +01:00
parent 3b062d2774
commit cf3e5c9b98
1 changed files with 10 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import org.gcube.informationsystem.resourceregistry.environments.instances.Insta
import org.gcube.informationsystem.resourceregistry.utils.MetadataUtility;
import org.gcube.informationsystem.serialization.ElementMapper;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -457,9 +458,10 @@ public class ContextManagementTest extends ContextTest {
}
/*
// @Test
@Ignore
@Test
public void deleteAll() throws Exception {
ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE);
ContextTest.setContextByName(GCUBE);
List<Context> all = getAll();
while(all.size()>0) {
for (Context context : all) {
@ -490,12 +492,14 @@ public class ContextManagementTest extends ContextTest {
}
}
@Ignore
// @Test
public void readContext() throws ResourceRegistryException, IOException {
Context context = read(UUID.fromString(""));
logger.debug("{}", context);
}
@Ignore
// @Test
public void deleteContext() throws ResourceRegistryException, IOException {
Context context = read(UUID.fromString(""));
@ -506,6 +510,10 @@ public class ContextManagementTest extends ContextTest {
public void testContextCache() throws Exception {
List<Context> contexts = getAll();
logger.info("{}", contexts);
if(contexts==null || contexts.size()==0) {
logger.warn("No context found. The test cannot be executed.");
return;
}
ServerContextCache contextCache = ServerContextCache.getInstance();
Map<UUID, String> uuidToContextFullName = contextCache.getUUIDToContextFullNameAssociation();