gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] 04/11: bank-lib twisted tests scaffold don


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 04/11: bank-lib twisted tests scaffold done.
Date: Sat, 17 Mar 2018 02:10:47 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository exchange.

commit c4770643e319a140876251b5a31ae6eee3d1868d
Author: Marcello Stanisci <address@hidden>
AuthorDate: Sat Mar 3 01:05:12 2018 +0100

    bank-lib twisted tests scaffold done.
---
 src/bank-lib/Makefile.am             |  1 +
 src/bank-lib/bank_twisted.conf       | 33 +++++++++++++++++++++++++++++++++
 src/bank-lib/test_bank_api_twisted.c | 18 +++++++++++++++---
 3 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/src/bank-lib/Makefile.am b/src/bank-lib/Makefile.am
index 892c0d7..b840791 100644
--- a/src/bank-lib/Makefile.am
+++ b/src/bank-lib/Makefile.am
@@ -98,6 +98,7 @@ test_bank_api_twisted_LDADD = \
   $(LIBGCRYPT_LIBS) \
   -ltalertesting \
   -ltalertwistertesting \
+  -ltalerbanktesting \
   -ltalerfakebank \
   -ltalerbank \
   -ltalerexchange \
diff --git a/src/bank-lib/bank_twisted.conf b/src/bank-lib/bank_twisted.conf
new file mode 100644
index 0000000..54e8c80
--- /dev/null
+++ b/src/bank-lib/bank_twisted.conf
@@ -0,0 +1,33 @@
+
+[twister]
+# HTTP listen port for twister
+HTTP_PORT = 8888
+
+# HTTP Destination for twister.  The test-Webserver needs
+# to listen on the port used here.  Note: no trailing '/'!
+DESTINATION_BASE_URL = "http://localhost:8081";
+
+# Control port for TCP
+# PORT = 8889
+HOSTNAME = localhost
+ACCEPT_FROM = 127.0.0.1;
+ACCEPT_FROM6 = ::1;
+
+# Control port for UNIX
+UNIXPATH = /tmp/taler-service-twister.sock
+UNIX_MATCH_UID = NO
+UNIX_MATCH_GID = YES
+
+# Launching of twister by ARM
+# BINARY = taler-service-twister
+# AUTOSTART = NO
+# FORCESTART = NO
+
+[taler]
+currency = KUDOS
+
+[bank]
+http_port = 8081
+
+[exchange-wire-test]
+bank_url = http://localhost:8081/
diff --git a/src/bank-lib/test_bank_api_twisted.c 
b/src/bank-lib/test_bank_api_twisted.c
index 717f3d4..2561a74 100644
--- a/src/bank-lib/test_bank_api_twisted.c
+++ b/src/bank-lib/test_bank_api_twisted.c
@@ -36,13 +36,14 @@
 #include <taler/taler_fakebank_lib.h>
 #include <taler/taler_testing_lib.h>
 #include <taler/taler_twister_testing_lib.h>
+#include <taler/taler_testing_bank_lib.h>
 #include <taler/taler_twister_service.h>
 
 /**
  * Configuration file we use.  One (big) configuration is used
  * for the various components for this test.
  */
-#define CONFIG_FILE "test_bank_api_twisted.conf"
+#define CONFIG_FILE "bank_twisted.conf"
 
 /**
  * (real) Twister URL.  Used at startup time to check if it runs.
@@ -50,11 +51,22 @@
 static char *twister_url;
 
 /**
+ * URL of the twister where all the connections to the
+ * bank that have to be proxied should be addressed to.
+ */
+#define TWISTED_BANK_URL twister_url
+
+/**
  * URL of the bank.
  */
 static char *bank_url;
 
 /**
+ * Bank process.
+ */
+static struct GNUNET_OS_Process *bankd;
+
+/**
  * Twister process.
  */
 static struct GNUNET_OS_Process *twisterd;
@@ -79,7 +91,7 @@ run (void *cls,
     TALER_TESTING_cmd_end ()
   };
 
-  TALER_TESTING_run_with_fakebank (is, commands);
+  TALER_TESTING_run (is, commands);
 }
 
 /**
@@ -115,7 +127,7 @@ main (int argc,
   if (NULL == (twister_url = TALER_TESTING_prepare_twister
       (CONFIG_FILE)))
     return 77;
-
+  
   if (NULL == (twisterd = TALER_TESTING_run_twister (CONFIG_FILE)))
     return 77;
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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