diff options
Diffstat (limited to 'src/testing/testing_api_cmd_exec_aggregator.c')
-rw-r--r-- | src/testing/testing_api_cmd_exec_aggregator.c | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/src/testing/testing_api_cmd_exec_aggregator.c b/src/testing/testing_api_cmd_exec_aggregator.c index 6ec56c175..1f05576ff 100644 --- a/src/testing/testing_api_cmd_exec_aggregator.c +++ b/src/testing/testing_api_cmd_exec_aggregator.c @@ -43,6 +43,11 @@ struct AggregatorState * Configuration file used by the aggregator. */ const char *config_filename; + + /** + * Run with KYC restrictions on. + */ + bool kyc_on; }; @@ -68,6 +73,9 @@ aggregator_run (void *cls, "taler-exchange-aggregator", "-c", as->config_filename, "-t", /* exit when done */ + (as->kyc_on) + ? NULL + : "-y", /* skip KYC */ NULL); if (NULL == as->aggregator_proc) { @@ -115,7 +123,7 @@ aggregator_cleanup (void *cls, * @param index index number of the object to offer. * @return #GNUNET_OK on success */ -static int +static enum GNUNET_GenericReturnValue aggregator_traits (void *cls, const void **ret, const char *trait, @@ -123,7 +131,7 @@ aggregator_traits (void *cls, { struct AggregatorState *as = cls; struct TALER_TESTING_Trait traits[] = { - TALER_TESTING_make_trait_process (0, &as->aggregator_proc), + TALER_TESTING_make_trait_process (&as->aggregator_proc), TALER_TESTING_trait_end () }; @@ -134,14 +142,6 @@ aggregator_traits (void *cls, } -/** - * Make a "aggregator" CMD. - * - * @param label command label. - * @param config_filename configuration file for the - * aggregator to use. - * @return the command. - */ struct TALER_TESTING_Command TALER_TESTING_cmd_exec_aggregator (const char *label, const char *config_filename) @@ -164,4 +164,27 @@ TALER_TESTING_cmd_exec_aggregator (const char *label, } +struct TALER_TESTING_Command +TALER_TESTING_cmd_exec_aggregator_with_kyc (const char *label, + const char *config_filename) +{ + struct AggregatorState *as; + + as = GNUNET_new (struct AggregatorState); + as->config_filename = config_filename; + as->kyc_on = true; + { + struct TALER_TESTING_Command cmd = { + .cls = as, + .label = label, + .run = &aggregator_run, + .cleanup = &aggregator_cleanup, + .traits = &aggregator_traits + }; + + return cmd; + } +} + + /* end of testing_api_cmd_exec_aggregator.c */ |