|
|
|
@ -734,9 +734,10 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
@Test
|
|
|
|
|
public void testCatalogueHarvester() {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
// String context = ROOT;
|
|
|
|
|
String context = "/gcube";
|
|
|
|
|
//Utils.setContext(RESOURCE_CATALOGUE);
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
ContextTest.setContextByName(context);
|
|
|
|
|
System.out.println("vaaa");
|
|
|
|
|
AggregationType measureType = AggregationType.MONTHLY;
|
|
|
|
|
|
|
|
|
@ -751,13 +752,14 @@ public class AccountingDataHarvesterPluginTest extends ContextTest {
|
|
|
|
|
|
|
|
|
|
// ContextAuthorization contextAuthorization = new ContextAuthorization();
|
|
|
|
|
// SortedSet<String> contexts = contextAuthorization.getContexts();
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// for(String context : contexts) {
|
|
|
|
|
ScopeBean scopeBean = new ScopeBean(ROOT);
|
|
|
|
|
ScopeBean scopeBean = new ScopeBean(context);
|
|
|
|
|
logger.debug("FullName {} - Name {}", scopeBean.toString(), scopeBean.name());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ContextTest.setContextByName(ROOT);
|
|
|
|
|
ContextTest.setContextByName(context);
|
|
|
|
|
CatalogueAccessesHarvester catalogueHarvester = new CatalogueAccessesHarvester(start, end);
|
|
|
|
|
List<AccountingRecord> data = catalogueHarvester.getAccountingRecords();
|
|
|
|
|
for (AccountingRecord accountingRecord : data) {
|
|
|
|
|