updated jUnit test

This commit is contained in:
Francesco Mangiacrapa 2021-02-17 12:24:44 +01:00
parent 427e00903d
commit b6d8632b54
1 changed files with 16 additions and 1 deletions

View File

@ -41,7 +41,7 @@ public class TestDataCatalogueLib {
//private String scope = "/d4science.research-infrastructures.eu/gCubeApps/BiodiversityLab";
//private String testUser = "costantino_perciante";
private String testUser = "francesco.mangiacrapa";
private String authorizationToken = "8e74a17c-92f1-405a-b591-3a6090066248-98187548";
private String authorizationToken = "";
String subjectId = "aa_father4";
String objectId = "bb_son4";
String productName = "adatasetcreatedbycatalogue-util-library-873805063";
@ -116,6 +116,21 @@ public class TestDataCatalogueLib {
long end = System.currentTimeMillis();
LOG.debug("Time taken " + (end - init));
}
/**
* Gets the user role by group.
*
* @return the user role by group
* @throws Exception the exception
*/
@Test
public void getDataset() throws Exception{
DataCatalogueImpl instance = factory.getUtilsPerScope(scope);
String username = testUser;
CkanDataset dataset = instance.getDataset("sarda-sarda", username);
LOG.debug("Got dataset: " +dataset.getName() + ", with id: "+dataset.getId());
}
/**
* Gets the user role by organization.