gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: launching the bank


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: launching the bank from the "paygen".
Date: Fri, 04 May 2018 16:20:50 +0200

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

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 5b1083f  launching the bank from the "paygen".
5b1083f is described below

commit 5b1083f5c30084fb0f780f4b23c9d5942368d5fe
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri May 4 16:20:25 2018 +0200

    launching the bank from the "paygen".
---
 src/merchant-tools/Makefile.am                     |  1 +
 .../taler-merchant-generate-payments_new.c         | 47 +++++++++++++++-------
 2 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/src/merchant-tools/Makefile.am b/src/merchant-tools/Makefile.am
index 0ad5520..be51a7c 100644
--- a/src/merchant-tools/Makefile.am
+++ b/src/merchant-tools/Makefile.am
@@ -26,6 +26,7 @@ taler_merchant_generate_payments_new_LDADD = \
   -ltalermerchanttesting \
   -ltalerfakebank \
   -ltalerbank \
+  -ltalerbanktesting \
   -ltalerexchange \
   -ltalerjson \
   -ltalerutil \
diff --git a/src/merchant-tools/taler-merchant-generate-payments_new.c 
b/src/merchant-tools/taler-merchant-generate-payments_new.c
index fb5939e..30ac366 100644
--- a/src/merchant-tools/taler-merchant-generate-payments_new.c
+++ b/src/merchant-tools/taler-merchant-generate-payments_new.c
@@ -34,6 +34,7 @@
 #include <taler/taler_bank_service.h>
 #include <taler/taler_fakebank_lib.h>
 #include <taler/taler_testing_lib.h>
+#include <taler/taler_testing_bank_lib.h>
 #include <taler/taler_error_codes.h>
 #include "taler_merchant_testing_lib.h"
 
@@ -48,6 +49,11 @@ unsigned int result = 1;
 static struct GNUNET_OS_Process *merchantd;
 
 /**
+ * Bank process.
+ */
+static struct GNUNET_OS_Process *bankd;
+
+/**
  * How many payments we want to generate.
  */
 unsigned int payments_number;
@@ -58,14 +64,14 @@ unsigned int payments_number;
 unsigned int tracks_number;
 
 /**
- * Merchant base URL.
+ * Bank base URL.
  */
-static char *merchant_url;
+static char *bank_url;
 
 /**
- * Fakebank URL.
+ * Merchant base URL.
  */
-static char *fakebank_url;
+static char *merchant_url;
 
 /**
  * Actual commands collection.
@@ -74,17 +80,12 @@ static void
 run_commands (void *cls,
               struct TALER_TESTING_Interpreter *is)
 {
-
-
-  struct TALER_TESTING_Command commands[] = {
-
+  /*struct TALER_TESTING_Command commands[] = {
     TALER_TESTING_cmd_end ()
   };
 
-  TALER_TESTING_run_with_fakebank (is,
-                                   commands,
-                                   fakebank_url);
-  return;
+  TALER_TESTING_run (is, commands);*/
+  TALER_LOG_INFO ("End-of-work\n");
 }
 
 /**
@@ -122,10 +123,16 @@ run (void *cls,
 
   result = 0;
 
-  if (NULL == (fakebank_url = TALER_TESTING_prepare_fakebank
-        (cfgfile, "account-1")))
+  if (NULL == bank_url)
   {
-    TALER_LOG_ERROR ("Failed to prepare the fakebank\n");
+    TALER_LOG_ERROR ("Option -b is mandatory!\n");
+    result = 5;
+    return;
+  }
+  if (NULL == (bankd = TALER_TESTING_run_bank (cfgfile,
+                                               bank_url)))
+  {
+    TALER_LOG_ERROR ("Failed to run the bank\n");
     result = 4;
     GNUNET_OS_process_kill (merchantd, SIGTERM);
     GNUNET_OS_process_wait (merchantd);
@@ -141,6 +148,9 @@ run (void *cls,
   GNUNET_OS_process_kill (merchantd, SIGTERM);
   GNUNET_OS_process_wait (merchantd);
   GNUNET_OS_process_destroy (merchantd);
+  GNUNET_OS_process_kill (bankd, SIGTERM);
+  GNUNET_OS_process_wait (bankd);
+  GNUNET_OS_process_destroy (bankd);
 }
 
 
@@ -186,6 +196,13 @@ main (int argc,
        "merchant base url, mandatory",
        &merchant_url),
 
+    GNUNET_GETOPT_option_string
+      ('b',
+       "bank-url",
+       "BU",
+       "bank base url, mandatory",
+       &bank_url),
+
     GNUNET_GETOPT_OPTION_END
   };
 

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



reply via email to

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