This commit is contained in:
Roberto Cirillo 2021-11-19 09:40:32 +01:00
commit e09b50bb4d
6 changed files with 30 additions and 38 deletions

View File

@ -1,5 +1,11 @@
# Changelog for storage-manager-wrapper
## [v4.0.0-SNAPSHOT]
* removed slf4j implementations, added slf4j-simple;
* Discovering serviceEndpoint with category Storage
* moved version from 3.1.0-SNAPSHOT to 4.0.0-SNAPSHOT
## [v3.0.1-SNAPSHOT]
* removed http protocol;
* deprecated old smp classes
@ -13,4 +19,4 @@
## [v2.5.3] 2019-03-20
* Added wrapper for HomeLibrary configuration related to the new preproduction infrastructure

40
pom.xml
View File

@ -63,16 +63,16 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<scope>test</scope>
</dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.32</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
@ -107,24 +107,6 @@
</execution>
</executions>
</plugin>
<!-- <plugin> -->
<!-- <groupId>org.apache.maven.plugins</groupId> -->
<!-- <artifactId>maven-assembly-plugin</artifactId> -->
<!-- <configuration> -->
<!-- <descriptors> -->
<!-- <descriptor>${distroDirectory}/descriptor.xml</descriptor> -->
<!-- </descriptors> -->
<!-- </configuration> -->
<!-- <executions> -->
<!-- <execution> -->
<!-- <id>servicearchive</id> -->
<!-- <phase>install</phase> -->
<!-- <goals> -->
<!-- <goal>single</goal> -->
<!-- </goals> -->
<!-- </execution> -->
<!-- </executions> -->
<!-- </plugin> -->
</plugins>
</build>
</project>
</project>

View File

@ -44,7 +44,7 @@ public class DownloadsTest {
ScopeProvider.instance.set(Costants.DEFAULT_SCOPE_STRING);
// ScopeProvider.instance.set(scope);
try {
client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE).getClient();
client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, Costants.DEFAULT_MEMORY_TYPE, Costants.BACKEND_TYPE).getClient();
assertNotNull(client);
} catch (Exception e) {
// TODO Auto-generated catch block

View File

@ -9,6 +9,7 @@ import org.gcube.common.resources.gcore.GenericResource;
import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.resources.gcore.utils.XPathHelper;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.contentmanager.storageclient.test.utils.Costants;
import org.gcube.contentmanager.storageclient.wrapper.ISClientConnector;
import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
@ -21,7 +22,7 @@ import org.w3c.dom.NodeList;
public class FwsQueryTest {
String scope="/gcube/devsec";
String scope=Costants.DEFAULT_SCOPE_STRING;//"/gcube/devsec";
@Before
public void setscope(){

View File

@ -31,13 +31,13 @@ public class HLcheckTest {
private String absoluteLocalPath;
private String newFilePath="src/test/resources";
private IClient client;
private String scope="/gcube";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";//Costants.DEFAULT_SCOPE_STRING;//"/gcube/devsec";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";// //"/CNR.it";// ///gcube/devsec/devVRE"; //"/CNR.it/ISTI";//"/gcube/devsec/devVRE"; // /d4science.research-infrastructures.eu"; //"/d4science.research-infrastructures.eu"; //"/CNR.it/ISTI";//
private String scope="/d4science.research-infrastructures.eu";//"/gcube";//"/d4science.research-infrastructures.eu";//Costants.DEFAULT_SCOPE_STRING;//"/gcube/devsec";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";//"/d4science.research-infrastructures.eu";// //"/CNR.it";// ///gcube/devsec/devVRE"; //"/CNR.it/ISTI";//"/gcube/devsec/devVRE"; // /d4science.research-infrastructures.eu"; //"/d4science.research-infrastructures.eu"; //"/CNR.it/ISTI";//
private String serviceClass="org.gcube.portlets.user";//"JUnitTest";
private String serviceName="home-library";//"test-home-library";//"StorageManager";
private String id;
private String id1;
// @Before
@Before
public void getClient() throws RemoteBackendException{
// ScopeProvider.instance.set(Costants.DEFAULT_SCOPE_STRING);
ScopeProvider.instance.set(scope);
@ -86,11 +86,12 @@ public class HLcheckTest {
removeLocalFile();
}
// @Test
@Test
public void downloadBySpecificIdOnlyForTest() throws RemoteBackendException{
// String idReturned=client.get().LFile(newFilePath).RFileById(id);
String file="/home/rcirillo-pc/Downloads/ce1159aa-a87f-4074-a3f9-36fe26d62f87-d4science.research-infrastructures.eu-gCubeApps-DESCRAMBLE.zip";
String idReturned=client.get().LFile(file).RFile("5f6a1f405b0bde3544cbd3be");
// String file="/home/rcirillo-pc/Downloads/ce1159aa-a87f-4074-a3f9-36fe26d62f87-d4science.research-infrastructures.eu-gCubeApps-DESCRAMBLE.zip";
String file="/Users/roberto/VivianaOtero/detailed_simulation_4327.csv";
String idReturned=client.get().LFile(file).RFile("60830489d56b08199c3407c6");
System.out.println("downloadById id: "+idReturned);
// File f =new File(newFilePath);
File f =new File(file);

View File

@ -4,6 +4,7 @@
package org.gcube.contentmanager.storageclient.test.utils;
import org.gcube.contentmanager.storageclient.wrapper.BackendType;
import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
@ -14,7 +15,8 @@ import org.gcube.contentmanager.storageclient.wrapper.MemoryType;
public final class Costants {
public static final MemoryType DEFAULT_MEMORY_TYPE = MemoryType.PERSISTENT;
public static final String DEFAULT_SCOPE_STRING="/gcube/devsec";
public static final String DEFAULT_SCOPE_STRING="/gcube/devsec/devVRE";//"/gcube/devNext/NextNext";//"/gcube/devsec/devVRE";
public static final String DEFAULT_PASS_PHRASE="this is a phrasethis is a phrase";
public static final BackendType BACKEND_TYPE=BackendType.S3;
}