From 85ea36fb003b4e5681ca239e580c90e9223e150c Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Thu, 14 Jun 2018 16:19:10 +0000 Subject: [PATCH] commented tests to avoid unwanted launch git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-dashboard-harvester-se-plugin@169228 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../AccountingDataHarvesterPluginTest.java | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) 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);