[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-twister] 19/34: renaming operation.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-twister] 19/34: renaming operation. |
Date: |
Sat, 17 Mar 2018 01:58:10 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository twister.
commit 540ac8ac81319f3f57300a28872f2f67b32267c5
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Mar 8 17:18:08 2018 +0100
renaming operation.
---
src/include/taler_twister_testing_lib.h | 12 ++---
src/test/test_twister.sh | 4 +-
src/twister/taler-twister.c | 7 ++-
src/twister/testing_api_cmd_exec_client.c | 75 +++++++++++++++----------------
4 files changed, 48 insertions(+), 50 deletions(-)
diff --git a/src/include/taler_twister_testing_lib.h
b/src/include/taler_twister_testing_lib.h
index 21f5544..b91f906 100644
--- a/src/include/taler_twister_testing_lib.h
+++ b/src/include/taler_twister_testing_lib.h
@@ -48,20 +48,20 @@ TALER_TESTING_cmd_hack_response_code (const char *label,
/**
- * This command replaces the JSON object contained in the
- * response and pointed by @a path, with a empty one ("{}").
+ * This command deletes the JSON object contained in the
+ * response and pointed by @a path.
*
* @param label command label
* @param config_filename configuration filename.
* @param path object-like path notation to point the object
* to be made empty. "f1.0.f2" will empty the object
- * {"f1": [{"f2": {will be emptied. }}]}.
+ * {"f1": [{"f2": "I'll be deleted"}]}.
*
* @return the command
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_empty_object (const char *label,
- const char *config_filename,
- const char *path);
+TALER_TESTING_cmd_delete_object (const char *label,
+ const char *config_filename,
+ const char *path);
#endif
diff --git a/src/test/test_twister.sh b/src/test/test_twister.sh
index 227ac46..85fa5d5 100755
--- a/src/test/test_twister.sh
+++ b/src/test/test_twister.sh
@@ -16,8 +16,8 @@ taler-twister -c ./test_twister.conf --responsecode 202
status_code=$(curl -s ${TWISTER_URL} -o /dev/null \
-w "%{http_code}")
-# empty (inner) object.
-taler-twister -c ./test_twister.conf -e "hello.0"
+# delete object.
+taler-twister -c ./test_twister.conf -d "hello.0"
# get emptied response.
emptied_body=$(curl -s ${TWISTER_URL})
diff --git a/src/twister/taler-twister.c b/src/twister/taler-twister.c
index d3e5fe8..65d4cef 100644
--- a/src/twister/taler-twister.c
+++ b/src/twister/taler-twister.c
@@ -170,12 +170,11 @@ main (int argc,
struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_option_string
- ('e',
- "emptyobject",
+ ('d',
+ "deleteobject",
"PATH",
gettext_noop
- ("Make the object pointed by PATH empty."
- " It will not empty non-objects.\n"),
+ ("Delete the object pointed by PATH.\n"),
&delete_path),
GNUNET_GETOPT_option_flag
diff --git a/src/twister/testing_api_cmd_exec_client.c
b/src/twister/testing_api_cmd_exec_client.c
index ce8c3db..1d2c0df 100644
--- a/src/twister/testing_api_cmd_exec_client.c
+++ b/src/twister/testing_api_cmd_exec_client.c
@@ -29,7 +29,7 @@
#include <taler/taler_testing_lib.h>
#include "taler_twister_testing_lib.h"
-struct EmptyObjectState
+struct DeleteObjectState
{
/**
* Process handle for the twister CLI client.
@@ -37,7 +37,7 @@ struct EmptyObjectState
struct GNUNET_OS_Process *proc;
/**
- * Object-like notation to the object to make empty.
+ * Object-like notation to the object to delete.
*/
const char *path;
@@ -191,21 +191,21 @@ TALER_TESTING_cmd_hack_response_code (const char *label,
* @param cls closure
*/
static void
-empty_object_cleanup
+delete_object_cleanup
(void *cls,
const struct TALER_TESTING_Command *cmd)
{
- struct EmptyObjectState *eos = cls;
+ struct DeleteObjectState *dos = cls;
- if (NULL != eos->proc)
+ if (NULL != dos->proc)
{
- GNUNET_break (0 == GNUNET_OS_process_kill (eos->proc,
+ GNUNET_break (0 == GNUNET_OS_process_kill (dos->proc,
SIGKILL));
- GNUNET_OS_process_wait (eos->proc);
- GNUNET_OS_process_destroy (eos->proc);
- eos->proc = NULL;
+ GNUNET_OS_process_wait (dos->proc);
+ GNUNET_OS_process_destroy (dos->proc);
+ dos->proc = NULL;
}
- GNUNET_free (eos);
+ GNUNET_free (dos);
}
/**
@@ -221,15 +221,15 @@ empty_object_cleanup
* @return #GNUNET_OK on success
*/
static int
-empty_object_traits (void *cls,
- void **ret,
- const char *trait,
- unsigned int index)
+delete_object_traits (void *cls,
+ void **ret,
+ const char *trait,
+ unsigned int index)
{
- struct EmptyObjectState *eos = cls;
+ struct DeleteObjectState *dos = cls;
struct TALER_TESTING_Trait traits[] = {
- TALER_TESTING_make_trait_process (0, &eos->proc),
+ TALER_TESTING_make_trait_process (0, &dos->proc),
TALER_TESTING_trait_end ()
};
@@ -244,21 +244,21 @@ empty_object_traits (void *cls,
* FIXME: document.
*/
static void
-empty_object_run (void *cls,
- const struct TALER_TESTING_Command *cmd,
- struct TALER_TESTING_Interpreter *is)
+delete_object_run (void *cls,
+ const struct TALER_TESTING_Command *cmd,
+ struct TALER_TESTING_Interpreter *is)
{
- struct EmptyObjectState *eos = cls;
+ struct DeleteObjectState *dos = cls;
- eos->proc = GNUNET_OS_start_process (GNUNET_NO,
+ dos->proc = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_ALL,
NULL, NULL, NULL,
"taler-twister",
"taler-twister",
- "-c", eos->config_filename,
- "--emptyobject", eos->path,
+ "-c", dos->config_filename,
+ "--emptyobject", dos->path,
NULL);
- if (NULL == eos->proc)
+ if (NULL == dos->proc)
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (is);
@@ -269,33 +269,32 @@ empty_object_run (void *cls,
/**
- * This command replaces the JSON object contained in the
- * response and pointed by @a path, with a empty one ("{}").
+ * This command deletes the JSON object pointed by @a path.
*
* @param label command label
* @param config_filename configuration filename.
* @param path object-like path notation to point the object
- * to be made empty.
+ * to delete.
*
* @return the command
*/
struct TALER_TESTING_Command
-TALER_TESTING_cmd_empty_object (const char *label,
- const char *config_filename,
- const char *path)
+TALER_TESTING_cmd_delete_object (const char *label,
+ const char *config_filename,
+ const char *path)
{
- struct EmptyObjectState *eos;
+ struct DeleteObjectState *dos;
struct TALER_TESTING_Command cmd;
- eos = GNUNET_new (struct EmptyObjectState);
- eos->path = path;
- eos->config_filename = config_filename;
+ dos = GNUNET_new (struct DeleteObjectState);
+ dos->path = path;
+ dos->config_filename = config_filename;
cmd.label = label;
- cmd.run = &empty_object_run;
- cmd.cleanup = &empty_object_cleanup;
- cmd.traits = &empty_object_traits;
- cmd.cls = eos;
+ cmd.run = &delete_object_run;
+ cmd.cleanup = &delete_object_cleanup;
+ cmd.traits = &delete_object_traits;
+ cmd.cls = dos;
return cmd;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-twister] 18/34: avoid duplicating tokenized string., (continued)
- [GNUnet-SVN] [taler-twister] 18/34: avoid duplicating tokenized string., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 02/34: parse proxied response., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 27/34: fix last path token detection., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 28/34: new-line, gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 33/34: rely again on RNG., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 25/34: make mods cumulative, gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 20/34: option name., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 24/34: add testing-lib command to modify responses., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 31/34: implement upload data malformation., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 34/34: leading slash when constructing twister url., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 19/34: renaming operation.,
gnunet <=
- [GNUnet-SVN] [taler-twister] 26/34: remove number conversion, for now., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 32/34: fix headers preparation for malformed uploads., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 22/34: object walker as separate function., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 21/34: dup'ing path string., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 23/34: add command to modify responses., gnunet, 2018/03/16
- [GNUnet-SVN] [taler-twister] 29/34: adding command for randomly truncating responses., gnunet, 2018/03/16