parent
295a8641ee
commit
86fee9cdbe
2
pom.xml
2
pom.xml
|
@ -32,7 +32,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.contentmanagement</groupId>
|
<groupId>org.gcube.contentmanagement</groupId>
|
||||||
<artifactId>storage-manager-core</artifactId>
|
<artifactId>storage-manager-core</artifactId>
|
||||||
<version>[2.2.0, 3.0.0-SNAPSHOT)</version>
|
<version>[2.9.0, 3.0.0-SNAPSHOT)</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -30,15 +30,16 @@ public class HLcheckTest {
|
||||||
private String absoluteLocalPath;
|
private String absoluteLocalPath;
|
||||||
private String newFilePath="src/test/resources";
|
private String newFilePath="src/test/resources";
|
||||||
private IClient client;
|
private IClient client;
|
||||||
private String scope=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";//"/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 serviceClass="org.gcube.portlets.user";//"JUnitTest";
|
||||||
private String serviceName="test-home-library";//"StorageManager";
|
private String serviceName="home-library";//"test-home-library";//"StorageManager";
|
||||||
private String id;
|
private String id;
|
||||||
private String id1;
|
private String id1;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void getClient() throws RemoteBackendException{
|
public void getClient() throws RemoteBackendException{
|
||||||
ScopeProvider.instance.set(Costants.DEFAULT_SCOPE_STRING);
|
// ScopeProvider.instance.set(Costants.DEFAULT_SCOPE_STRING);
|
||||||
|
ScopeProvider.instance.set(scope);
|
||||||
try {
|
try {
|
||||||
client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, scope, false).getClient();
|
client=new StorageClient(serviceClass, serviceName, owner, AccessType.SHARED, scope, false).getClient();
|
||||||
assertNotNull(client);
|
assertNotNull(client);
|
||||||
|
@ -84,6 +85,19 @@ public class HLcheckTest {
|
||||||
removeLocalFile();
|
removeLocalFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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");
|
||||||
|
System.out.println("downloadById id: "+idReturned);
|
||||||
|
// File f =new File(newFilePath);
|
||||||
|
File f =new File(file);
|
||||||
|
System.out.println("path new File downloaded: "+f.getAbsolutePath());
|
||||||
|
assertTrue(f.exists());
|
||||||
|
removeLocalFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue