summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-09-12 11:25:33 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-09-12 11:25:33 +0200
commit3b28f5888b7144c15e7a8f595329760fcef38386 (patch)
treef7f2ec0e3c0c788b44eb83214b47977e32ec56b8
parentaeeb3188bfae0e32d92b0c35bb2502b7fbcbcaee (diff)
downloadtwister-3b28f5888b7144c15e7a8f595329760fcef38386.tar.gz
twister-3b28f5888b7144c15e7a8f595329760fcef38386.tar.bz2
twister-3b28f5888b7144c15e7a8f595329760fcef38386.zip
Libtalertwister example slide.
-rw-r--r--presentation/twister.tex41
1 files changed, 30 insertions, 11 deletions
diff --git a/presentation/twister.tex b/presentation/twister.tex
index 734e0e3..7b973d8 100644
--- a/presentation/twister.tex
+++ b/presentation/twister.tex
@@ -123,8 +123,8 @@
\begin{Verbatim}[fontsize=\tiny]
# CLI
- $ taler-twister --modify-upload=child.one \
- --value=newvalue
+ $ taler-twister -c twister.conf \
+ --flip-ul=child.one
\end{Verbatim}
\end{minipage}
\end{column}
@@ -133,8 +133,7 @@
\end{frame}
\begin{frame}[fragile]
- \frametitle{Driving it}
- \framesubtitle{Libtalertwister}
+ \frametitle{Driving it (Libtalertwister)}
% libtalertwister: control API examples (giving Twister commands
% to twist next request/response)
@@ -144,18 +143,38 @@
\end{textblock*}
\begin{Verbatim}[fontsize=\tiny]
+ #include <taler/taler_testing_lib.h>
#include <taler/taler_twister_testing_lib.h>
#include <taler/taler_twister_service.h>
- ..
+
const char *proxied_url;
struct GNUNET_OS_Process *twisterd;
- /* Checks ports are available, extract proxied URL. */
- proxied_url = TALER_TESTING_prepare_twister ("twister.conf");
- twisterd = TALER_TESTING_run_twister ("twister.conf");
-
-
-
+ void
+ run (void *cls,
+ struct TALER_TESTING_Interpreter *is)
+ {
+ struct TALER_TESTING_Command commands[] = {
+ TALER_TESTING_cmd_flip_upload ("cmd-name",
+ "test.conf",
+ "child.one"),
+ /* Will test the flipped field. */
+ TALER_TESTING_cmd_x ("name-x",
+ ..),
+ TALER_TESTING_cmd_end ()
+ };
+ }
+
+ int
+ main ()
+ {
+ /* Checks ports are available, extract proxied URL. */
+ proxied_url = TALER_TESTING_prepare_twister ("twister.conf");
+ twisterd = TALER_TESTING_run_twister ("twister.conf");
+
+ return TALER_TESTING_setup (&run,
+ "test.conf");
+ }
\end{Verbatim}
\end{frame}