[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] 01/03: modified testing cmd secret_share
From: |
gnunet |
Subject: |
[taler-anastasis] 01/03: modified testing cmd secret_share |
Date: |
Mon, 04 May 2020 09:47:41 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
commit f1b3eb453b7dc7246cb6efc3546bb0eb9a63d173
Author: Dennis Neufeld <address@hidden>
AuthorDate: Mon May 4 07:14:41 2020 +0000
modified testing cmd secret_share
---
src/include/anastasis_testing_lib.h | 3 ++-
src/lib/testing_cmd_secret_share.c | 38 +++++++++++++++++++++++++++++++++++--
2 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/src/include/anastasis_testing_lib.h
b/src/include/anastasis_testing_lib.h
index b72f3e1..4753f11 100644
--- a/src/include/anastasis_testing_lib.h
+++ b/src/include/anastasis_testing_lib.h
@@ -596,6 +596,7 @@ enum ANASTASIS_TESTING_SecretShareOption
* @param anastasis_url base URL of the anastasis serving our requests.
* @param http_status expected HTTP status.
* @param sso secret share options
+ * @param ... NULL-terminated list of policy create commands
* @return the command
*/
struct TALER_TESTING_Command
@@ -604,7 +605,7 @@ ANASTASIS_TESTING_cmd_secret_share (const char *label,
unsigned int http_status,
enum
ANASTASIS_TESTING_SecretShareOption sso,
- const char *upload_ref);
+ ...);
/* ********************* test recover secret ********************* */
diff --git a/src/lib/testing_cmd_secret_share.c
b/src/lib/testing_cmd_secret_share.c
index 5e95f24..ef7db5c 100644
--- a/src/lib/testing_cmd_secret_share.c
+++ b/src/lib/testing_cmd_secret_share.c
@@ -37,6 +37,21 @@ struct SecretShareState
*/
struct TALER_TESTING_Interpreter *is;
+ /**
+ * Label of this command.
+ */
+ const char *label;
+
+ /**
+ * References to commands of previous policy creations.
+ */
+ const char **cmd_label_array;
+
+ /**
+ * Length of array of command labels (cmd_label_array).
+ */
+ unsigned int cmd_label_array_length;
+
/**
* URL of the anastasis backend.
*/
@@ -143,6 +158,7 @@ secret_share_traits (void *cls,
* @param anastasis_url base URL of the anastasis serving our requests.
* @param http_status expected HTTP status.
* @param sso secret share options
+ * @param ... NULL-terminated list of policy create commands
* @return the command
*/
struct TALER_TESTING_Command
@@ -151,15 +167,33 @@ ANASTASIS_TESTING_cmd_secret_share (const char *label,
unsigned int http_status,
enum
ANASTASIS_TESTING_SecretShareOption sso,
- const char *upload_ref)
+ ...)
{
struct SecretShareState *sss;
+ va_list ap;
sss = GNUNET_new (struct SecretShareState);
sss->http_status = http_status;
sss->ssopt = sso;
sss->anastasis_url = anastasis_url;
- sss->upload_reference = upload_ref;
+ sss->label = label;
+
+ va_start (ap, sso);
+ char *policy_create_cmd;
+ while (NULL != (policy_create_cmd = va_arg (ap, const char *)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "At %s:%d policy create cmd is %s\n", __FILE__, __LINE__,
+ policy_create_cmd);
+ GNUNET_array_append (pcs->cmd_label_array,
+ pcs->cmd_label_array_length,
+ policy_create_cmd);
+ }
+ va_end (ap);
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "At %s:%d cmd label array length is %i\n", __FILE__, __LINE__,
+ pcs->cmd_label_array_length);
struct TALER_TESTING_Command cmd = {
.cls = sss,
--
To stop receiving notification emails like this one, please contact
address@hidden.