summaryrefslogtreecommitdiff
path: root/src/bank-lib/testing_api_cmd_reject.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-02-27 22:49:18 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-02-27 22:55:18 +0100
commit663f26a1a269d91e5d6ab2d9d5d01102d6ffd353 (patch)
treedac11467e1e82b1464263b13d87ab272cd464167 /src/bank-lib/testing_api_cmd_reject.c
parentcfab4194f08af08227d33d768d3e2001434bb6cd (diff)
downloadexchange-663f26a1a269d91e5d6ab2d9d5d01102d6ffd353.tar.gz
exchange-663f26a1a269d91e5d6ab2d9d5d01102d6ffd353.tar.bz2
exchange-663f26a1a269d91e5d6ab2d9d5d01102d6ffd353.zip
fix reject test command.
Diffstat (limited to 'src/bank-lib/testing_api_cmd_reject.c')
-rw-r--r--src/bank-lib/testing_api_cmd_reject.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/bank-lib/testing_api_cmd_reject.c b/src/bank-lib/testing_api_cmd_reject.c
index 0383c1066..c01c27d87 100644
--- a/src/bank-lib/testing_api_cmd_reject.c
+++ b/src/bank-lib/testing_api_cmd_reject.c
@@ -140,6 +140,33 @@ reject_run (void *cls,
/**
+ * @param cls closure
+ * @param ret[out] result (could be anything)
+ * @param trait name of the trait
+ * @param selector more detailed information about which object
+ * to return in case there were multiple generated
+ * by the command
+ * @return #GNUNET_OK on success
+ */
+static int
+reject_traits (void *cls,
+ void **ret,
+ const char *trait,
+ unsigned int index)
+{
+ struct RejectState *rs = cls;
+ struct TALER_TESTING_Trait traits[] = {
+ TALER_TESTING_make_trait_rejected (0, rs->deposit_reference),
+ TALER_TESTING_trait_end ()
+ };
+
+ return TALER_TESTING_get_trait (traits,
+ ret,
+ trait,
+ index);
+}
+
+/**
* FIXME.
*/
struct TALER_TESTING_Command
@@ -158,6 +185,7 @@ TALER_TESTING_cmd_bank_reject (const char *label,
cmd.run = &reject_run;
cmd.cleanup = &reject_cleanup;
cmd.label = label;
+ cmd.traits = &reject_traits;
return cmd;