37 lines
1.0 KiB
Java
37 lines
1.0 KiB
Java
package org.gcube.informationsystem.sweeper;
|
|
|
|
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
|
import org.gcube.common.scope.api.ScopeProvider;
|
|
import org.junit.Test;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
public class ISSweeperPluginTest {
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(ISSweeperPluginTest.class);
|
|
|
|
@Test
|
|
public void testLaunch() throws ObjectNotFound, Exception{
|
|
String[] tokens = {
|
|
ScopedTest.GCUBE,
|
|
ScopedTest.GCUBE_DEVSEC,
|
|
ScopedTest.GCUBE_DEVSEC_DEVVRE,
|
|
ScopedTest.GCUBE_DEVNEXT,
|
|
ScopedTest.GCUBE_DEVNEXT_NEXTNEXT
|
|
};
|
|
|
|
for(String token : tokens){
|
|
logger.info("\n\n\n-------------------------------------------------------------------------");
|
|
ScopedTest.setContext(token);
|
|
try{
|
|
ISSweeperPlugin isExporterPlugin = new ISSweeperPlugin(new ISSweeperPluginDeclaration());
|
|
isExporterPlugin.launch(null);
|
|
}catch (Exception e) {
|
|
logger.error("Sweeper error on {}", ScopeProvider.instance.get(), e);
|
|
}
|
|
logger.info("\n\n\n");
|
|
}
|
|
}
|
|
|
|
}
|