aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_traits.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-07 23:11:05 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-07 23:11:05 +0200
commita2dde02b64a8ee75c9243632eb45a6ceb9b62dd5 (patch)
tree378cb6aefaf7f00894a7c8916fad9c3de84e31b4 /src/testing/testing_api_traits.c
parent015b08b0489d72f3fda587eec900bc4193a6a57e (diff)
major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core
Diffstat (limited to 'src/testing/testing_api_traits.c')
-rw-r--r--src/testing/testing_api_traits.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/testing/testing_api_traits.c b/src/testing/testing_api_traits.c
index db94e81a5..d84e2c37e 100644
--- a/src/testing/testing_api_traits.c
+++ b/src/testing/testing_api_traits.c
@@ -67,7 +67,7 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits,
return GNUNET_OK;
}
}
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Trait %s/%u not found.\n",
trait,
index);
@@ -75,4 +75,31 @@ TALER_TESTING_get_trait (const struct TALER_TESTING_Trait *traits,
}
+struct TALER_EXCHANGE_Handle *
+TALER_TESTING_get_exchange (struct TALER_TESTING_Interpreter *is)
+{
+ struct TALER_EXCHANGE_Handle *exchange;
+ const struct TALER_TESTING_Command *exchange_cmd;
+
+ exchange_cmd
+ = TALER_TESTING_interpreter_get_command (is,
+ "exchange");
+ if (NULL == exchange_cmd)
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return NULL;
+ }
+ if (GNUNET_OK !=
+ TALER_TESTING_get_trait_exchange (exchange_cmd,
+ &exchange))
+ {
+ GNUNET_break (0);
+ TALER_TESTING_interpreter_fail (is);
+ return NULL;
+ }
+ return exchange;
+}
+
+
/* end of testing_api_traits.c */