gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: add test for del_authentication


From: gnunet
Subject: [taler-anastasis] branch master updated: add test for del_authentication
Date: Wed, 24 Feb 2021 22:00:31 +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 8da991b  add test for del_authentication
8da991b is described below

commit 8da991beef3fb959bc663f887814cf220cae8182
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Feb 24 22:00:29 2021 +0100

    add test for del_authentication
---
 .../test_anastasis_reducer_add_authentication.sh    | 21 +++++++++++++++++++++
 src/reducer/anastasis_api_backup_redux.c            |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/cli/test_anastasis_reducer_add_authentication.sh 
b/src/cli/test_anastasis_reducer_add_authentication.sh
index 9fd3a95..aa51a1b 100755
--- a/src/cli/test_anastasis_reducer_add_authentication.sh
+++ b/src/cli/test_anastasis_reducer_add_authentication.sh
@@ -114,4 +114,25 @@ fi
 
 echo " OK"
 
+
+echo -n "Test del authentication ..."
+
+anastasis-reducer -a \
+  '{"auth_method_index": 2 }' \
+  del_authentication $TFILE $SFILE
+
+STATE=`jq -r -e .backup_state < $SFILE`
+if test "$STATE" != "AUTHENTICATIONS_EDITING"
+then
+    exit_fail "Expected new state to be 'AUTHENTICATIONS_EDITING', got 
'$STATE'"
+fi
+
+ARRAY_LENGTH=`jq -r -e '.authentication_methods | length' < $SFILE`
+if test $ARRAY_LENGTH != 2
+then
+    exit_fail "Expected array length to be 2, 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 4d6067b..1b7f9e6 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -2279,7 +2279,7 @@ ANASTASIS_backup_action_ (json_t *state,
     },
     {
       ANASTASIS_BACKUP_STATE_AUTHENTICATIONS_EDITING,
-      "delete_authentication",
+      "del_authentication",
       &del_authentication
     },
     {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]