summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_lock_product.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_lock_product.c')
-rw-r--r--src/testing/testing_api_cmd_lock_product.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/testing/testing_api_cmd_lock_product.c b/src/testing/testing_api_cmd_lock_product.c
index 0389e9c0..4a05e823 100644
--- a/src/testing/testing_api_cmd_lock_product.c
+++ b/src/testing/testing_api_cmd_lock_product.c
@@ -164,6 +164,35 @@ lock_product_cleanup (void *cls,
/**
+ * Offer internal data to other commands.
+ *
+ * @param cls closure
+ * @param ret[out] result (could be anything)
+ * @param trait name of the trait
+ * @param index index number of the object to extract.
+ * @return #GNUNET_OK on success
+ */
+static int
+lock_product_traits (void *cls,
+ const void **ret,
+ const char *trait,
+ unsigned int index)
+{
+ struct LockProductState *lps = cls;
+
+ struct TALER_TESTING_Trait traits[] = {
+ TALER_TESTING_make_trait_uuid (0, &lps->uuid),
+ TALER_TESTING_trait_end ()
+ };
+
+ return TALER_TESTING_get_trait (traits,
+ ret,
+ trait,
+ index);
+}
+
+
+/**
* Define a "LOCK /products/$ID" CMD.
*
* @param label command label.
@@ -201,7 +230,8 @@ TALER_TESTING_cmd_merchant_lock_product (
.cls = pis,
.label = label,
.run = &lock_product_run,
- .cleanup = &lock_product_cleanup
+ .cleanup = &lock_product_cleanup,
+ .traits = &lock_product_traits
};
return cmd;