summaryrefslogtreecommitdiff
path: root/src/include/taler_testing_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-09-28 08:52:34 +0200
committerChristian Grothoff <grothoff@gnunet.org>2022-09-28 08:54:14 +0200
commitd645ea5c8e2c1fd087669a442089323f75dce0ba (patch)
tree26d04e2b73bf85b76a1f76821393781bf7de0eab /src/include/taler_testing_lib.h
parent2635f2e0b8246a08e3456ced3068fe161b07a87b (diff)
downloadexchange-d645ea5c8e2c1fd087669a442089323f75dce0ba.tar.gz
exchange-d645ea5c8e2c1fd087669a442089323f75dce0ba.tar.bz2
exchange-d645ea5c8e2c1fd087669a442089323f75dce0ba.zip
skeleton for reserve control testing commands
Diffstat (limited to 'src/include/taler_testing_lib.h')
-rw-r--r--src/include/taler_testing_lib.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 8137ecc59..84ba18378 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -1525,6 +1525,76 @@ TALER_TESTING_cmd_reserve_status (const char *label,
/**
+ * Create a POST "/reserves/$RID/open" command.
+ *
+ * @param label the command label.
+ * @param reserve_reference reference to the reserve to open.
+ * @param reserve_pay amount to pay from the reserve balance
+ * @param expiration_time how long into the future should the reserve remain open
+ * @param min_purses minimum number of purses to allow
+ * @param expected_response_code expected HTTP response code.
+ * @param ... NULL terminated list of pairs of coin references and amounts
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_reserve_open (const char *label,
+ const char *reserve_reference,
+ const char *reserve_pay,
+ struct GNUNET_TIME_Relative expiration_time,
+ uint32_t min_purses,
+ unsigned int expected_response_code,
+ ...);
+
+
+/**
+ * Create a GET "/reserves/$RID/attest" command.
+ *
+ * @param label the command label.
+ * @param reserve_reference reference to the reserve to get attestable attributes of.
+ * @param expected_response_code expected HTTP response code.
+ * @param ... NULL-terminated list of attributes expected
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_reserve_get_attestable (const char *label,
+ const char *reserve_reference,
+ unsigned int expected_response_code,
+ ...);
+
+
+/**
+ * Create a POST "/reserves/$RID/attest" command.
+ *
+ * @param label the command label.
+ * @param reserve_reference reference to the reserve to get attests for
+ * @param expected_response_code expected HTTP response code.
+ * @param ... NULL-terminated list of attributes that should be attested
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_reserve_attest (const char *label,
+ const char *reserve_reference,
+ unsigned int expected_response_code,
+ ...);
+
+
+/**
+ * Create a POST "/reserves/$RID/close" command.
+ *
+ * @param label the command label.
+ * @param reserve_reference reference to the reserve to close.
+ * @param target_account where to wire funds remaining, can be NULL
+ * @param expected_response_code expected HTTP response code.
+ * @return the command.
+ */
+struct TALER_TESTING_Command
+TALER_TESTING_cmd_reserve_close (const char *label,
+ const char *reserve_reference,
+ const char *target_account,
+ unsigned int expected_response_code);
+
+
+/**
* Create a "deposit" command.
*
* @param label command label.