[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: del => delete
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: del => delete |
Date: |
Mon, 01 Mar 2021 11:45:09 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 99a271a del => delete
99a271a is described below
commit 99a271afd8abbae031288f00d3af0b5790159c5a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Mar 1 11:45:07 2021 +0100
del => delete
---
.../test_anastasis_reducer_add_authentication.sh | 4 +--
.../test_anastasis_reducer_done_authentication.sh | 4 +--
.../test_anastasis_reducer_done_policy_review.sh | 40 ++++++++++++++++++++++
src/reducer/anastasis_api_backup_redux.c | 4 +--
4 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/src/cli/test_anastasis_reducer_add_authentication.sh
b/src/cli/test_anastasis_reducer_add_authentication.sh
index 402cae9..9c97983 100755
--- a/src/cli/test_anastasis_reducer_add_authentication.sh
+++ b/src/cli/test_anastasis_reducer_add_authentication.sh
@@ -111,11 +111,11 @@ fi
echo " OK"
-echo -n "Test del authentication ..."
+echo -n "Test delete authentication ..."
anastasis-reducer -a \
'{"auth_method_index": 2 }' \
- del_authentication $TFILE $SFILE
+ delete_authentication $TFILE $SFILE
STATE=`jq -r -e .backup_state < $SFILE`
if test "$STATE" != "AUTHENTICATIONS_EDITING"
diff --git a/src/cli/test_anastasis_reducer_done_authentication.sh
b/src/cli/test_anastasis_reducer_done_authentication.sh
index d3b8da7..87c738c 100755
--- a/src/cli/test_anastasis_reducer_done_authentication.sh
+++ b/src/cli/test_anastasis_reducer_done_authentication.sh
@@ -27,11 +27,10 @@ function cleanup()
# Install cleanup handler (except for kill -9)
TFILE=`mktemp test_reducer_stateXXXXXX`
-
trap cleanup EXIT
# Check we can actually run
-echo -n "Testing for jq"
+echo -n "Testing for jq ..."
jq -h > /dev/null || exit_skip "jq required"
echo " FOUND"
@@ -45,6 +44,7 @@ anastasis-reducer next resources/03-backup.json $TFILE 2>
/dev/null && exit_fail
echo " OK"
+
echo -n "Test done authentication (next) ..."
anastasis-reducer next resources/04-backup.json $TFILE
diff --git a/src/cli/test_anastasis_reducer_done_policy_review.sh
b/src/cli/test_anastasis_reducer_done_policy_review.sh
index 09ca55c..110296c 100755
--- a/src/cli/test_anastasis_reducer_done_policy_review.sh
+++ b/src/cli/test_anastasis_reducer_done_policy_review.sh
@@ -62,4 +62,44 @@ fi
echo " OK"
+
+
+echo -n "Test adding policy ..."
+anastasis-reducer -a \
+ '{ "policy" : [
+ { "auth_method_index" : 1,
+ "provider" : "http://localhost:8088/" },
+ { "auth_method_index" : 1,
+ "provider" : "http://localhost:8089/" }
+ ] }' \
+ add_policy \
+ resources/05-backup.json \
+ $TFILE 2> /dev/null
+
+ARRAY_LENGTH=`jq -r -e '.policies | length' < $TFILE`
+if test $ARRAY_LENGTH -lt 4
+then
+ exit_fail "Expected policy array length to be >= 4, got $ARRAY_LENGTH"
+fi
+
+echo " OK"
+
+
+echo -n "Test deleting policy ..."
+anastasis-reducer -a \
+ '{ "policy_index" : 2 }' \
+ delete_policy \
+ resources/05-backup.json \
+ $TFILE 2> /dev/null
+
+ARRAY_LENGTH=`jq -r -e '.policies | length' < $TFILE`
+if test $ARRAY_LENGTH -ge 3
+then
+ exit_fail "Expected policy array length to be < 3, got $ARRAY_LENGTH"
+fi
+
+echo " OK"
+
+
+
exit 0
diff --git a/src/reducer/anastasis_api_backup_redux.c
b/src/reducer/anastasis_api_backup_redux.c
index fc315b1..a4c31e4 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -242,7 +242,7 @@ add_authentication (json_t *state,
/**
* DispatchHandler/Callback function which is called for a
- * "del_authentication" action.
+ * "delete_authentication" action.
* Returns an #ANASTASIS_ReduxAction if operation is async.
*
* @param state state to operate on
@@ -2300,7 +2300,7 @@ ANASTASIS_backup_action_ (json_t *state,
},
{
ANASTASIS_BACKUP_STATE_AUTHENTICATIONS_EDITING,
- "del_authentication",
+ "delete_authentication",
&del_authentication
},
{
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: del => delete,
gnunet <=