[#21560] Checking the bug fix done

Moved to gcube-smartgears-bom.2.1.0
This commit is contained in:
Francesco Mangiacrapa 2021-06-04 15:09:06 +02:00
parent 0ac4b3354b
commit 9aeab44de6
6 changed files with 39 additions and 26 deletions

View File

@ -4,6 +4,13 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2-5-1-SNAPSHOT] - 2021-06-04
**Bug fixes**
[#21560] Checking the bug fix done
Moved to gcube-smartgears-bom.2.1.0
## [v2-5-0] - 2021-04-08
**New features**

12
pom.xml
View File

@ -9,7 +9,7 @@
</parent>
<groupId>org.gcube.data.transfer</groupId>
<artifactId>uri-resolver</artifactId>
<version>2.5.0</version>
<version>2.5.1-SNAPSHOT</version>
<packaging>war</packaging>
<description>The URI Resolver is an HTTP URI resolver implemented as an REST service which gives access trough HTTP to different gcube Resolvers and gCube Applications.</description>
@ -31,7 +31,7 @@
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>gcube-smartgears-bom</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -228,6 +228,14 @@
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>

View File

@ -35,7 +35,6 @@ import eu.trentorise.opendata.jackan.exceptions.CkanException;
import eu.trentorise.opendata.jackan.model.CkanDataset;
// TODO: Auto-generated Javadoc
/**
* The Class CkanCatalogueConfigurationsReader.
*
@ -121,7 +120,7 @@ public class CkanCatalogueConfigurationsReader {
CkanClient client = new CkanClient(catalogueURL);
return client.getDataset(datasetIdorName);
}catch(CkanException e){
logger.info("Getting dataset "+datasetIdorName+" thrown a CkanException, returning null");
logger.info("Getting dataset "+datasetIdorName+" thrown a CkanException, returning null", e);
return null;
}

View File

@ -13,9 +13,7 @@ import java.util.Collection;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
@ -32,7 +30,6 @@ import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datatransfer.resolver.requesthandler.RequestHandler;
import org.gcube.datatransfer.resolver.services.error.ExceptionManager;
import org.gcube.datatransfer.resolver.services.exceptions.NotFoundException;
import org.gcube.datatransfer.resolver.util.Util;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
import org.slf4j.Logger;

View File

@ -1,51 +1,53 @@
package org.gcube.datatransfer.test;
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datatransfer.resolver.catalogue.resource.CkanCatalogueConfigurationsReader;
import org.gcube.datatransfer.resolver.catalogue.resource.GatewayCKANCatalogueReference;
import org.gcube.datatransfer.resolver.init.UriResolverSmartGearManagerInit;
import org.gcube.datatransfer.resolver.services.CatalogueResolver;
/**
* The Class CatalogueResolverTest.
*
* @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it)
*
* May 13, 2019
* May 13, 2019
*/
public class CatalogueResolverTest {
private static String entityName = "using_e-infrastructures_for_biodiversity_conservation";
private static String entityName = "testing_bug_fix_21560_as_public";
private static String entityContext = "ctlg";
private static String vreName = "BlueBridgeProject";
private static String vreName = "devVRE";
private String rootContextScope = "/gcube";
private String authorizationToken = "";
private static String rootContextScope = "/gcube/devsec/devVRE";
private static String authorizationToken = "";
//@Before
// @Before
public void init() {
UriResolverSmartGearManagerInit.setRootContextScope(rootContextScope);
}
//@Test
// @Test
public void testCatalogueResolver() {
ScopeProvider.instance.set(rootContextScope);
SecurityTokenProvider.instance.set(authorizationToken);
CatalogueResolver catalogRes = new CatalogueResolver();
catalogRes.resolveCatalogue(null, entityName, vreName, entityContext);
}
//@Test
// @Test
public void testCatalogueLoadEndPoints() {
try {
//ScopeProvider.instance.set("/d4science.research-infrastructures.eu");
GatewayCKANCatalogueReference ckanCatalogueReference = CkanCatalogueConfigurationsReader.loadCatalogueEndPoints();
// ScopeProvider.instance.set("/d4science.research-infrastructures.eu");
GatewayCKANCatalogueReference ckanCatalogueReference = CkanCatalogueConfigurationsReader
.loadCatalogueEndPoints();
System.out.println(ckanCatalogueReference.toString());
}catch (Exception e) {
} catch (Exception e) {
e.printStackTrace();
}
}