diff --git a/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java b/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java index 9505ffc..6addb62 100644 --- a/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java +++ b/src/test/java/org/gcube/dataharvest/AccountingDataHarvesterPluginTest.java @@ -48,9 +48,44 @@ public class AccountingDataHarvesterPluginTest extends ContextTest { return contexts; } - - @Test + // @Test public void launch() { + try { + + org.gcube.dataharvest.utils.Utils.setContext(ROOT); + + DataHarvestPluginDeclaration dataHarvestPluginDeclaration = new DataHarvestPluginDeclaration(); + + AccountingDataHarvesterPlugin accountingDataHarvesterPlugin = new AccountingDataHarvesterPlugin( + dataHarvestPluginDeclaration); + + Map inputs = new HashMap<>(); + + AggregationType aggregationType = AggregationType.MONTHLY; + + inputs.put(AccountingDataHarvesterPlugin.MEASURE_TYPE_INPUT_PARAMETER, aggregationType.name()); + inputs.put(AccountingDataHarvesterPlugin.GET_VRE_USERS_INPUT_PARAMETER, false); + inputs.put(AccountingDataHarvesterPlugin.RERUN_INPUT_PARAMETER, true); + inputs.put(AccountingDataHarvesterPlugin.DRY_RUN_INPUT_PARAMETER, true); + + /* + Calendar from = DateUtils.getStartCalendar(2016, Calendar.SEPTEMBER, 1); + String fromDate = DateUtils.LAUNCH_DATE_FORMAT.format(from.getTime()); + logger.trace("{} is {}", AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate); + inputs.put(AccountingDataHarvesterPlugin.START_DATE_INPUT_PARAMETER, fromDate); + */ + + accountingDataHarvesterPlugin.launch(inputs); + + logger.info("End."); + + } catch(Exception e) { + logger.error("", e); + } + } + + // @Test + public void launchOldData() { try { org.gcube.dataharvest.utils.Utils.setContext(ROOT);