twister

HTTP fault injector for testing
Log | Files | Refs | README | LICENSE

commit 3b28f5888b7144c15e7a8f595329760fcef38386
parent aeeb3188bfae0e32d92b0c35bb2502b7fbcbcaee
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Wed, 12 Sep 2018 11:25:33 +0200

Libtalertwister example slide.

Diffstat:
Mpresentation/twister.tex | 41++++++++++++++++++++++++++++++-----------
1 file changed, 30 insertions(+), 11 deletions(-)

diff --git 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}