Fixed test
This commit is contained in:
parent
8bde27d0b7
commit
3dcafc7c05
|
@ -37,8 +37,8 @@ public class ContextTest {
|
||||||
public static final String DEVSEC;
|
public static final String DEVSEC;
|
||||||
public static final String DEVVRE;
|
public static final String DEVVRE;
|
||||||
|
|
||||||
private static final String ROOT_PROD;
|
public static final String ROOT_PRE;
|
||||||
private static final String ROOT_PRE;
|
public static final String ROOT_PROD;
|
||||||
|
|
||||||
protected static final Properties properties;
|
protected static final Properties properties;
|
||||||
|
|
||||||
|
@ -54,8 +54,9 @@ public class ContextTest {
|
||||||
DEVSEC = GCUBE + "/devsec";
|
DEVSEC = GCUBE + "/devsec";
|
||||||
DEVVRE = DEVSEC + "/devVRE";
|
DEVVRE = DEVSEC + "/devVRE";
|
||||||
|
|
||||||
ROOT_PROD = "/d4science.research-infrastructures.eu";
|
|
||||||
ROOT_PRE = "/pred4s";
|
ROOT_PRE = "/pred4s";
|
||||||
|
ROOT_PROD = "/d4science.research-infrastructures.eu";
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_TEST_SCOPE = DEVVRE;
|
DEFAULT_TEST_SCOPE = DEVVRE;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import org.gcube.common.storagehub.client.dsl.OpenResolver;
|
||||||
import org.gcube.common.storagehub.model.Metadata;
|
import org.gcube.common.storagehub.model.Metadata;
|
||||||
import org.gcube.common.storagehub.model.items.Item;
|
import org.gcube.common.storagehub.model.items.Item;
|
||||||
import org.gcube.common.storagehub.model.service.Version;
|
import org.gcube.common.storagehub.model.service.Version;
|
||||||
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -45,19 +46,19 @@ public class StorageHubManagementTest extends ContextTest {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
@Test
|
@Test
|
||||||
public void testPublicLink() throws Exception {
|
public void testPublicLink() throws Exception {
|
||||||
|
@SuppressWarnings("unused")
|
||||||
String urlString = "https://data.dev.d4science.org/shub/E_WE9XM3Vad1orRGNhZVJJY0NybkFQR1BzRzZKUndPeVdLYTk4b1Y2MmVhVE9oZFYvM2hBb1JKRkluT1JQR1RZdQ==";
|
String urlString = "https://data.dev.d4science.org/shub/E_WE9XM3Vad1orRGNhZVJJY0NybkFQR1BzRzZKUndPeVdLYTk4b1Y2MmVhVE9oZFYvM2hBb1JKRkluT1JQR1RZdQ==";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//@Ignore
|
@Ignore
|
||||||
@Test
|
@Test
|
||||||
public void listFolders() throws Exception {
|
public void listFolders() throws Exception {
|
||||||
String c = "/pred4s/preprod/GRSF_Pre";
|
String c = "/gcube";
|
||||||
c = "/gcube";
|
// c = "/pred4s/preprod/GRSF_Pre";
|
||||||
c = "/d4science.research-infrastructures.eu/FARM/GRSF_Pre";
|
// c = "/d4science.research-infrastructures.eu/FARM/GRSF_Pre";
|
||||||
//ContextTest.setContextByName(c);
|
|
||||||
List<String> contexts = new ArrayList<>();
|
List<String> contexts = new ArrayList<>();
|
||||||
contexts.add(c);
|
contexts.add(c);
|
||||||
|
|
||||||
|
@ -83,15 +84,28 @@ public class StorageHubManagementTest extends ContextTest {
|
||||||
logger.info("Catalogue folder found");
|
logger.info("Catalogue folder found");
|
||||||
storageHubManagement.tree((FolderContainer) itemContainer);
|
storageHubManagement.tree((FolderContainer) itemContainer);
|
||||||
// if(name.compareTo("service-account-grsf-publisher")==0) {
|
// if(name.compareTo("service-account-grsf-publisher")==0) {
|
||||||
// itemContainer.delete();
|
// // itemContainer.delete();
|
||||||
|
// storageHubManagement.tree((FolderContainer) itemContainer);
|
||||||
// }
|
// }
|
||||||
}else {
|
}else {
|
||||||
storageHubManagement.logItem(itemContainer);
|
// storageHubManagement.logItem(itemContainer);
|
||||||
// storageHubManagement.tree((FolderContainer) itemContainer);
|
// storageHubManagement.tree((FolderContainer) itemContainer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Ignore
|
||||||
|
@Test
|
||||||
|
public void emptyTrash() throws Exception {
|
||||||
|
String c = GCUBE;
|
||||||
|
// c = ContextTest.ROOT_PRE;
|
||||||
|
// c = ContextTest.ROOT_PROD;
|
||||||
|
ContextTest.setContextByName(c);
|
||||||
|
StorageHubManagement storageHubManagement = new StorageHubManagement();
|
||||||
|
storageHubManagement.getStorageHubClient().emptyTrash();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue