This commit is contained in:
Fabio Sinibaldi 2016-11-16 11:00:40 +00:00
parent 56bed0b8ab
commit faa020b51b
2 changed files with 36658 additions and 54653 deletions

91215
log.txt

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,7 @@
package org.gcube.spatial.data.geonetwork.test; package org.gcube.spatial.data.geonetwork.test;
import java.util.ArrayList;
import org.gcube.spatial.data.geonetwork.GeoNetwork; import org.gcube.spatial.data.geonetwork.GeoNetwork;
import org.gcube.spatial.data.geonetwork.GeoNetworkAdministration; import org.gcube.spatial.data.geonetwork.GeoNetworkAdministration;
import org.gcube.spatial.data.geonetwork.GeoNetworkReader; import org.gcube.spatial.data.geonetwork.GeoNetworkReader;
@ -16,16 +18,70 @@ import it.geosolutions.geonetwork.util.GNSearchRequest;
public class ScopeTests { public class ScopeTests {
String[] scopes=new String[]{ // String[] scopes=new String[]{
// "/gcube", //// "/gcube",
// "/gcube/devsec", //// "/gcube/devsec",
// "/gcube/devsec/devVRE", //// "/gcube/devsec/devVRE",
// "/gcube/devNext/NextNext" //// "/gcube/devNext/NextNext"
//
// "/d4science.research-infrastructures.eu/gCubeApps/EcologicalModelling",
// "/d4science.research-infrastructures.eu/gCubeApps"
//
// };
"/d4science.research-infrastructures.eu/gCubeApps/EcologicalModelling", private static ArrayList<String> scopes=new ArrayList<String>();
"/d4science.research-infrastructures.eu/gCubeApps" static{
scopes.add("/gcube/devsec");
};
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/InfraScience");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ICES_TCRE");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/TabularDataLab");
// scopes.add("/d4science.research-infrastructures.eu/FARM/AquaMaps");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/PGFA-UFMT");
// scopes.add("/d4science.research-infrastructures.eu/FARM");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/EuBrazilOpenBio");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/EcologicalModelling");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-PSC");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ENVRIPlus");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ENVRI");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BOBLME_HilsaAWG");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ScalableDataMining");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/DESCRAMBLE");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/FAO_TunaAtlas");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/StocksAndFisheriesKB");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BlueCommons");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ICES_TCSSM");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BlueBRIDGE-EAB");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ARIADNE");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ProtectedAreaImpactMaps");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/OpenIt");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/AquacultureAtlasGeneration");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/Parthenos");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/IGDI");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/EGIEngage");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/RStudioLab");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/TimeSeries");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/RPrototypingLab");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/TCom");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ICCAT_BFT-E");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/SoBigData.it");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BlueBridgeProject");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BlueUptake");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/gCube");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/KnowledgeBridging");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/EFG");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/StockAssessment");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/iSearch");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/ICOS_ETC");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/VesselActivitiesAnalyzer");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/BiOnym");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/SoBigData.eu");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/PerformanceEvaluationInAquaculture");
// scopes.add("/d4science.research-infrastructures.eu/gCubeApps/StrategicInvestmentAnalysis");
}
@Test @Test
@ -57,7 +113,7 @@ public class ScopeTests {
@Test @Test
public void testGNUsersAndGroups() throws Exception{ public void testGNUsersAndGroups() throws Exception{
TokenSetter.set(scopes[0]); TokenSetter.set(scopes.get(0));
GeoNetworkAdministration admin=GeoNetwork.get(); GeoNetworkAdministration admin=GeoNetwork.get();
admin.login(LoginLevel.ADMIN); admin.login(LoginLevel.ADMIN);
System.out.println(admin.getGroups()); System.out.println(admin.getGroups());