bank-lib twisted tests scaffold done.

This commit is contained in:
Marcello Stanisci 2018-03-03 01:05:12 +01:00
parent 53cf576e62
commit c4770643e3
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
3 changed files with 49 additions and 3 deletions

View File

@ -98,6 +98,7 @@ test_bank_api_twisted_LDADD = \
$(LIBGCRYPT_LIBS) \ $(LIBGCRYPT_LIBS) \
-ltalertesting \ -ltalertesting \
-ltalertwistertesting \ -ltalertwistertesting \
-ltalerbanktesting \
-ltalerfakebank \ -ltalerfakebank \
-ltalerbank \ -ltalerbank \
-ltalerexchange \ -ltalerexchange \

View File

@ -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/

View File

@ -36,24 +36,36 @@
#include <taler/taler_fakebank_lib.h> #include <taler/taler_fakebank_lib.h>
#include <taler/taler_testing_lib.h> #include <taler/taler_testing_lib.h>
#include <taler/taler_twister_testing_lib.h> #include <taler/taler_twister_testing_lib.h>
#include <taler/taler_testing_bank_lib.h>
#include <taler/taler_twister_service.h> #include <taler/taler_twister_service.h>
/** /**
* Configuration file we use. One (big) configuration is used * Configuration file we use. One (big) configuration is used
* for the various components for this test. * 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. * (real) Twister URL. Used at startup time to check if it runs.
*/ */
static char *twister_url; 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. * URL of the bank.
*/ */
static char *bank_url; static char *bank_url;
/**
* Bank process.
*/
static struct GNUNET_OS_Process *bankd;
/** /**
* Twister process. * Twister process.
*/ */
@ -79,7 +91,7 @@ run (void *cls,
TALER_TESTING_cmd_end () TALER_TESTING_cmd_end ()
}; };
TALER_TESTING_run_with_fakebank (is, commands); TALER_TESTING_run (is, commands);
} }
/** /**