[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: switch tests to test country
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: switch tests to test country |
Date: |
Tue, 23 Feb 2021 09:16:00 +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 a87fd70 switch tests to test country
a87fd70 is described below
commit a87fd70c3426ff3b9c273eae8291dba1c37d8a13
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Feb 23 09:15:57 2021 +0100
switch tests to test country
---
contrib/redux.countries.json | 66 +++--
src/backend/anastasis-httpd.c | 4 -
src/cli/Makefile.am | 4 +-
src/cli/resources/00-backup.json | 3 +-
src/cli/resources/00-recovery.json | 3 +-
src/cli/resources/01-backup.json | 40 +--
src/cli/resources/01-recovery.json | 40 +--
src/cli/test_anastasis_reducer.conf | 254 -------------------
src/cli/test_anastasis_reducer_1.conf | 277 +--------------------
src/cli/test_anastasis_reducer_2.conf | 255 +------------------
src/cli/test_anastasis_reducer_3.conf | 254 +------------------
src/cli/test_anastasis_reducer_4.conf | 9 +
src/cli/test_anastasis_reducer_select_continent.sh | 12 +-
src/cli/test_anastasis_reducer_select_country.sh | 73 +++---
src/cli/test_reducer.conf | 44 ++--
15 files changed, 188 insertions(+), 1150 deletions(-)
diff --git a/contrib/redux.countries.json b/contrib/redux.countries.json
index 6a1f3d1..dd9d209 100644
--- a/contrib/redux.countries.json
+++ b/contrib/redux.countries.json
@@ -1,38 +1,64 @@
{
"countries": [
- {
+ {
"code" : "ch",
"name" : "Switzerland",
"continent" : "Europe",
- "name_i18n" : {
- "de_DE":"Schweiz",
- "de_CH":"Schwiiz",
- "fr":"Suisse",
- "en": "Swiss"
- },
- "currency": "TESTKUDOS"
+ "name_i18n" : {
+ "de_DE":"Schweiz",
+ "de_CH":"Schwiiz",
+ "fr":"Suisse",
+ "en": "Swiss"
+ },
+ "currency": "CHF"
},
- {
+ {
"code" : "de",
"name" : "Germany",
"continent" : "Europe",
"continent_i18n" : { "de" : "Europa" },
- "name_i18n" : { "de_DE":"Deutschland",
- "de_CH":"Deutschland",
- "fr": "Allemagne",
- "en": "Germany" },
- "currency": "TESTKUDOS"
+ "name_i18n" : {
+ "de_DE":"Deutschland",
+ "de_CH":"Deutschland",
+ "fr": "Allemagne",
+ "en": "Germany" },
+ "currency": "EUR"
},
- {
+ {
"code" : "us",
"name" : "United States of America (USA)",
- "continent" : "North_America",
+ "continent" : "North America",
"continent_i18n" : { "de" : "Nordamerika" },
- "name_i18n" : { "de_DE":"Vereinigte Staaten von Amerika (USA)",
- "de_CH":"Vereinigte Staaten von
Amerika (USA)",
- "fr": "États-Unis d'Amérique
(USA)",
- "en": "United States of America
(USA)" },
+ "name_i18n" : {
+ "de_DE":"Vereinigte Staaten von Amerika (USA)",
+ "de_CH":"Vereinigte Staaten von Amerika (USA)",
+ "fr": "États-Unis d'Amérique (USA)",
+ "en": "United States of America (USA)" },
+ "currency": "USD"
+ },
+ {
+ "code" : "xx",
+ "name" : "Testland",
+ "continent" : "Testcontinent",
+ "continent_i18n" : { "xx" : "Testkontinent" },
+ "name_i18n" : {
+ "de_DE":"Testlandt",
+ "de_CH":"Testlandi",
+ "fr": "Testpais",
+ "en": "Testland" },
"currency": "TESTKUDOS"
+ },
+ {
+ "code" : "xy",
+ "name" : "Demoland",
+ "continent" : "Testcontinent",
+ "continent_i18n" : { "xx" : "Testkontinent" },
+ "name_i18n" : {
+ "de_DE":"Demolandt",
+ "de_CH":"Demolandi",
+ "fr": "Demopais",
+ "en": "Demoland" },
+ "currency": "KUDOS"
}
]
}
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index 1dda270..7c2214f 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -601,10 +601,6 @@ run (void *cls,
global_result = GNUNET_SYSERR;
GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
NULL);
- GNUNET_assert (GNUNET_OK ==
- GNUNET_log_setup ("anastasis-httpd",
- "DEBUG",
- NULL));
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (config,
"anastasis",
diff --git a/src/cli/Makefile.am b/src/cli/Makefile.am
index 701d290..a483045 100644
--- a/src/cli/Makefile.am
+++ b/src/cli/Makefile.am
@@ -29,10 +29,10 @@ TESTS = \
EXTRA_DIST = \
$(check_SCRIPTS) \
test_reducer.conf \
- test_anastasis_reducer.conf \
test_anastasis_reducer_1.conf \
test_anastasis_reducer_2.conf \
- test_anastasis_reducer_3.conf
+ test_anastasis_reducer_3.conf \
+ test_anastasis_reducer_4.conf
# test_resources
anastasis_reducer_SOURCES = \
diff --git a/src/cli/resources/00-backup.json b/src/cli/resources/00-backup.json
index 17f5932..6e6c320 100644
--- a/src/cli/resources/00-backup.json
+++ b/src/cli/resources/00-backup.json
@@ -1,7 +1,8 @@
{
"continents": [
"Europe",
- "North_America"
+ "North America",
+ "Testcontinent"
],
"backup_state": "CONTINENT_SELECTING"
}
\ No newline at end of file
diff --git a/src/cli/resources/00-recovery.json
b/src/cli/resources/00-recovery.json
index 1a13bb6..acff19a 100644
--- a/src/cli/resources/00-recovery.json
+++ b/src/cli/resources/00-recovery.json
@@ -1,7 +1,8 @@
{
"continents": [
"Europe",
- "North_America"
+ "North America",
+ "Testcontinent"
],
"recovery_state": "CONTINENT_SELECTING"
}
\ No newline at end of file
diff --git a/src/cli/resources/01-backup.json b/src/cli/resources/01-backup.json
index 356e1b9..842d3af 100644
--- a/src/cli/resources/01-backup.json
+++ b/src/cli/resources/01-backup.json
@@ -1,37 +1,41 @@
{
"continents": [
"Europe",
- "North_America"
+ "North America",
+ "Testcontinent"
],
"backup_state": "COUNTRY_SELECTING",
- "selected_continent": "Europe",
+ "selected_continent": "Testcontinent",
"countries": [
{
- "code": "ch",
- "name": "Switzerland",
- "continent": "Europe",
+ "code": "xx",
+ "name": "Testland",
+ "continent": "Testcontinent",
+ "continent_i18n": {
+ "xx": "Testkontinent"
+ },
"name_i18n": {
- "de_DE": "Schweiz",
- "de_CH": "Schwiiz",
- "fr": "Suisse",
- "en": "Swiss"
+ "de_DE": "Testlandt",
+ "de_CH": "Testlandi",
+ "fr": "Testpais",
+ "en": "Testland"
},
"currency": "TESTKUDOS"
},
{
- "code": "de",
- "name": "Germany",
- "continent": "Europe",
+ "code": "xy",
+ "name": "Demoland",
+ "continent": "Testcontinent",
"continent_i18n": {
- "de": "Europa"
+ "xx": "Testkontinent"
},
"name_i18n": {
- "de_DE": "Deutschland",
- "de_CH": "Deutschland",
- "fr": "Allemagne",
- "en": "Germany"
+ "de_DE": "Demolandt",
+ "de_CH": "Demolandi",
+ "fr": "Demopais",
+ "en": "Demoland"
},
- "currency": "TESTKUDOS"
+ "currency": "KUDOS"
}
]
}
\ No newline at end of file
diff --git a/src/cli/resources/01-recovery.json
b/src/cli/resources/01-recovery.json
index 877a98a..11aafd3 100644
--- a/src/cli/resources/01-recovery.json
+++ b/src/cli/resources/01-recovery.json
@@ -1,37 +1,41 @@
{
"continents": [
"Europe",
- "North_America"
+ "North America",
+ "Testcontinent"
],
"recovery_state": "COUNTRY_SELECTING",
- "selected_continent": "Europe",
+ "selected_continent": "Testcontinent",
"countries": [
{
- "code": "ch",
- "name": "Switzerland",
- "continent": "Europe",
+ "code": "xx",
+ "name": "Testland",
+ "continent": "Testcontinent",
+ "continent_i18n": {
+ "xx": "Testkontinent"
+ },
"name_i18n": {
- "de_DE": "Schweiz",
- "de_CH": "Schwiiz",
- "fr": "Suisse",
- "en": "Swiss"
+ "de_DE": "Testlandt",
+ "de_CH": "Testlandi",
+ "fr": "Testpais",
+ "en": "Testland"
},
"currency": "TESTKUDOS"
},
{
- "code": "de",
- "name": "Germany",
- "continent": "Europe",
+ "code": "xy",
+ "name": "Demoland",
+ "continent": "Testcontinent",
"continent_i18n": {
- "de": "Europa"
+ "xx": "Testkontinent"
},
"name_i18n": {
- "de_DE": "Deutschland",
- "de_CH": "Deutschland",
- "fr": "Allemagne",
- "en": "Germany"
+ "de_DE": "Demolandt",
+ "de_CH": "Demolandi",
+ "fr": "Demopais",
+ "en": "Demoland"
},
- "currency": "TESTKUDOS"
+ "currency": "KUDOS"
}
]
}
\ No newline at end of file
diff --git a/src/cli/test_anastasis_reducer.conf
b/src/cli/test_anastasis_reducer.conf
deleted file mode 100644
index 3ee5b1f..0000000
--- a/src/cli/test_anastasis_reducer.conf
+++ /dev/null
@@ -1,254 +0,0 @@
-# This file is in the public domain.
-#
-[PATHS]
-# Persistent data storage for the testcase
-TALER_TEST_HOME = test_anastasis_api_home/
-
-# Persistent data storage
-TALER_DATA_HOME = $TALER_TEST_HOME/.local/share/taler/
-
-# Configuration files
-TALER_CONFIG_HOME = $TALER_TEST_HOME/.config/taler/
-
-# Cached data, no big deal if lost
-TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
-
-[taler]
-# What currency do we use?
-#currency = EUR
-currency = TESTKUDOS
-#CURRENCY_ROUND_UNIT = EUR:0.01
-#CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
-[bank]
-HTTP_PORT = 8082
-#BASE_URL = https://bank.test.taler.net/
-
-##########################################
-# Configuration for Anastasis #
-##########################################
-
-[anastasis]
-PORT = 8086
-
-DB = postgres
-
-# Base URL of anastasis.
-# BASE_URL = http://localhost:8086/
-
-# Where does our payment backend run? Must match PORT under [merchant]
-PAYMENT_BACKEND_URL = http://localhost:9966/
-
-# Annual fee we charge.
-#ANNUAL_FEE = EUR:4.99
-ANNUAL_FEE = TESTKUDOS:4.99
-#ANNUAL_FEE = TESTKUDOS:0
-#ANNUAL_FEE = EUR:0
-
-# Cost of authentication by question
-#QUESTION_COST = EUR:0
-QUESTION_COST = TESTKUDOS:0
-
-# Upload limit
-UPLOAD_LIMIT_MB = 1
-
-SUPPORTED_METHODS = question
-
-# Insurance
-INSURANCE = TESTKUDOS:1.0
-
-# Cost of authentication by file (only for testing purposes)
-FILE_COST = TESTKUDOS:1.0
-
-# Server salt 16 Byte
-SERVER_SALT = AUfO1KGOKYIFlFQg
-
-# This specifies which database the postgres backend uses.
-[stasis-postgres]
-CONFIG = postgres:///anastasischeck
-
-##########################################
-# Configuration for the merchant backend #
-##########################################
-
-[test]
-INSTANCES = default tor
-
-[merchant]
-
-# Which port do we run the backend on? (HTTP server)
-PORT = 9966
-
-# How quickly do we want the exchange to send us our money?
-# Used only if the frontend does not specify a value.
-WIRE_TRANSFER_DELAY = 0 s
-
-# Which plugin (backend) do we use for the DB.
-DB = postgres
-
-# Default choice for maximum wire fee.
-DEFAULT_MAX_WIRE_FEE = TESTKUDOS:0.10
-
-# Default choice for maximum deposit fee.
-DEFAULT_MAX_DEPOSIT_FEE = TESTKUDOS:0.10
-
-
-# This specifies which database the postgres backend uses.
-[merchantdb-postgres]
-CONFIG = postgres:///talercheck
-
-# Sections starting with "exchange-" specify trusted exchanges
-# (by the merchant)
-[merchant-exchange-default]
-#MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-#EXCHANGE_BASE_URL = http://localhost:8081/
-MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
-EXCHANGE_BASE_URL = https://exchange.test.taler.net/
-#CURRENCY = EUR
-CURRENCY = TESTKUDOS
-
-
-
-# only fixes skips.
-[auditor]
-BASE_URL = http://the.auditor/
-#BASE_URL = https://auditor.test.taler.net/
-#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
-# If currency does not match [TALER] section, the auditor
-# will be ignored!
-CURRENCY = TESTKUDOS
-
-# Auditors must be in sections "auditor-", the rest of the section
-# name could be anything.
-[auditor-ezb]
-# Informal name of the auditor. Just for the user.
-NAME = European Central Bank
-
-# URL of the auditor (especially for in the future, when the
-# auditor offers an automated issue reporting system).
-# Not really used today.
-URL = http://taler.ezb.eu/
-
-# This is the important bit: the signing key of the auditor.
-PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
-
-# Where do we store the auditor's private key?
-AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv
-
-# Which currency is this auditor trusted for?
-CURRENCY = TESTKUDOS
-
-
-###################################################
-# Configuration for the exchange for the testcase #
-###################################################
-
-[exchange_keys]
-
-# how long is one signkey valid?
-signkey_duration = 4 weeks
-
-# how long are the signatures with the signkey valid?
-legal_duration = 2 years
-
-# how long do we generate denomination and signing keys
-# ahead of time?
-lookahead_sign = 32 weeks 1 day
-
-# how long do we provide to clients denomination and signing keys
-# ahead of time?
-lookahead_provide = 4 weeks 1 day
-
-
-[exchange]
-# How to access our database
-DB = postgres
-
-# HTTP port the exchange listens to
-#PORT = 8081
-
-# Our public key
-MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-
-# Base URL of the exchange.
-BASE_URL = "http://localhost:8081/"
-#BASE_URL = https://exchange.test.taler.net/
-
-# Network configuration for the normal API/service HTTP server
-# serve via tcp socket (on PORT)
-SERVE = tcp
-
-
-[exchange-offline]
-
-# Where do we store the offline master private key of the exchange?
-MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-# Where do we store the TOFU key material?
-SECM_TOFU_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-# END
-##############################################################
-
-
-[exchangedb-postgres]
-CONFIG = "postgres:///talercheck"
-
-[auditordb-postgres]
-CONFIG = "postgres:///talercheck"
-
-# Account of the EXCHANGE
-[exchange-account-exchange]
-# What is the exchange's bank account (with the "Taler Bank" demo system)?
-PAYTO_URI = "payto://x-taler-bank/localhost:8082/2"
-
-WIRE_GATEWAY_URL = "http://localhost:8082/2/"
-WIRE_GATEWAY_AUTH_METHOD = NONE
-
-ENABLE_DEBIT = YES
-ENABLE_CREDIT = YES
-
-
-[coin_eur_ct_1]
-value = TESTKUDOS:0.01
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.00
-fee_deposit = TESTKUDOS:0.00
-fee_refresh = TESTKUDOS:0.01
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_ct_10]
-value = TESTKUDOS:0.10
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_1]
-value = TESTKUDOS:1
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_5]
-value = TESTKUDOS:5
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
diff --git a/src/cli/test_anastasis_reducer_1.conf
b/src/cli/test_anastasis_reducer_1.conf
index 488b569..6a9704d 100644
--- a/src/cli/test_anastasis_reducer_1.conf
+++ b/src/cli/test_anastasis_reducer_1.conf
@@ -1,278 +1,9 @@
-# This file is in the public domain.
-#
-[PATHS]
-# Persistant data storage for the testcase
-TALER_TEST_HOME = test_anastasis_api_home/
-
-# Persistant data storage
-TALER_DATA_HOME = $TALER_TEST_HOME/.local/share/taler/
-
-# Configuration files
-TALER_CONFIG_HOME = $TALER_TEST_HOME/.config/taler/
-
-# Cached data, no big deal if lost
-TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
-
-[taler]
-# What currency do we use?
-#currency = EUR
-currency = TESTKUDOS
-#CURRENCY_ROUND_UNIT = EUR:0.01
-#CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
-[bank]
-HTTP_PORT = 8082
-#BASE_URL = https://bank.test.taler.net/
-
-##########################################
-# Configuration for Anastasis #
-##########################################
+@INLINE@ test_reducer.conf
[anastasis]
-PORT = 8087
-
-DB = postgres
-
-# Base URL of anastasis.
-# BASE_URL = http://localhost:8086/
-
-# Where does our payment backend run? Must match PORT under [merchant]
-PAYMENT_BACKEND_URL = http://localhost:9966/
+PORT = 8086
+SERVER_SALT = AUfO1KGOKYIFlFQg
+BUSINESS_NAME = "Data loss #1 Inc."
-# Annual fee we charge.
-#ANNUAL_FEE = EUR:4.99
-ANNUAL_FEE = TESTKUDOS:1.99
-#ANNUAL_FEE = TESTKUDOS:0
-#ANNUAL_FEE = EUR:0
-
-# Cost of authentication by question
-#QUESTION_COST = EUR:0
-QUESTION_COST = TESTKUDOS:0
-
-# Insurance
-INSURANCE = TESTKUDOS:1.0
-
-# Cost of authentication by file (only for testing purposes)
-FILE_COST = TESTKUDOS:1.0
-
-# Upload limit
-UPLOAD_LIMIT_MB = 1
-
-SUPPORTED_METHODS = question
-
-# Server salt 16 Byte
-SERVER_SALT = BUfO1KGOKYIFlFQg
-
-# This specifies which database the postgres backend uses.
[stasis-postgres]
CONFIG = postgres:///anastasischeck1
-
-##########################################
-# Configuration for the merchant backend #
-##########################################
-
-[test]
-INSTANCES = default tor
-
-[merchant]
-
-# Which port do we run the backend on? (HTTP server)
-PORT = 9966
-
-# How quickly do we want the exchange to send us our money?
-# Used only if the frontend does not specify a value.
-WIRE_TRANSFER_DELAY = 0 s
-
-# Which plugin (backend) do we use for the DB.
-DB = postgres
-
-# Default choice for maximum wire fee.
-DEFAULT_MAX_WIRE_FEE = TESTKUDOS:0.10
-
-# Default choice for maximum deposit fee.
-DEFAULT_MAX_DEPOSIT_FEE = TESTKUDOS:0.10
-
-
-# This specifies which database the postgres backend uses.
-[merchantdb-postgres]
-CONFIG = postgres:///talercheck
-
-# Different instances operated by this merchant:
-[instance-default]
-KEYFILE = ${TALER_CONFIG_HOME}/merchant/default.priv
-NAME = Kudos Inc.
-
-# Account of the MERCHANT
-[merchant-account-merchant]
-# What is the merchant's bank account?
-PAYTO_URI = "payto://x-taler-bank/localhost:8082/3"
-
-# This is the *salted* response we give out for /contract requests.
-# File is generated on first use, no need for merchants to generate
-# the salt!
-WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/account-3.json
-
-# Accept payments to this account in instance-default
-HONOR_default = YES
-
-# Advertise in new contracts of instance-default
-ACTIVE_default = YES
-
-# Sections starting with "exchange-" specify trusted exchanges
-# (by the merchant)
-[merchant-exchange-default]
-#MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-#EXCHANGE_BASE_URL = http://localhost:8081/
-MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
-EXCHANGE_BASE_URL = https://exchange.test.taler.net/
-#CURRENCY = EUR
-CURRENCY = TESTKUDOS
-
-
-
-# only fixes skips.
-[auditor]
-BASE_URL = http://the.auditor/
-#BASE_URL = https://auditor.test.taler.net/
-#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
-# If currency does not match [TALER] section, the auditor
-# will be ignored!
-CURRENCY = TESTKUDOS
-
-# Where do we store the auditor's private key?
-AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv
-
-# Auditors must be in sections "auditor-", the rest of the section
-# name could be anything.
-[auditor-ezb]
-# Informal name of the auditor. Just for the user.
-NAME = European Central Bank
-
-# URL of the auditor (especially for in the future, when the
-# auditor offers an automated issue reporting system).
-# Not really used today.
-URL = http://taler.ezb.eu/
-
-# This is the important bit: the signing key of the auditor.
-PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
-
-# Which currency is this auditor trusted for?
-CURRENCY = TESTKUDOS
-
-
-###################################################
-# Configuration for the exchange for the testcase #
-###################################################
-
-[exchange_keys]
-
-# how long is one signkey valid?
-signkey_duration = 4 weeks
-
-# how long are the signatures with the signkey valid?
-legal_duration = 2 years
-
-# how long do we generate denomination and signing keys
-# ahead of time?
-lookahead_sign = 32 weeks 1 day
-
-# how long do we provide to clients denomination and signing keys
-# ahead of time?
-lookahead_provide = 4 weeks 1 day
-
-
-[exchange]
-# How to access our database
-DB = postgres
-
-# HTTP port the exchange listens to
-#PORT = 8081
-
-# Our public key
-MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-
-# Base URL of the exchange.
-BASE_URL = "http://localhost:8081/"
-#BASE_URL = https://exchange.test.taler.net/
-
-
-##############################################################
-## Added following lines because they were complaint in log ##
-# START
-# Network configuration for the normal API/service HTTP server
-# serve via tcp socket (on PORT)
-SERVE = tcp
-
-
-[exchange-offline]
-
-# Where do we store the offline master private key of the exchange?
-MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-# Where do we store the TOFU key material?
-SECM_TOFU_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-# END
-##############################################################
-
-
-[exchangedb-postgres]
-CONFIG = "postgres:///talercheck"
-
-[auditordb-postgres]
-CONFIG = "postgres:///talercheck"
-
-# Account of the EXCHANGE
-[exchange-account-exchange]
-# What is the exchange's bank account (with the "Taler Bank" demo system)?
-PAYTO_URI = "payto://x-taler-bank/localhost:8082/2"
-
-WIRE_GATEWAY_URL = "http://localhost:8082/2/"
-WIRE_GATEWAY_AUTH_METHOD = NONE
-
-ENABLE_DEBIT = YES
-ENABLE_CREDIT = YES
-
-
-[coin_eur_ct_1]
-value = TESTKUDOS:0.01
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.00
-fee_deposit = TESTKUDOS:0.00
-fee_refresh = TESTKUDOS:0.01
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_ct_10]
-value = TESTKUDOS:0.10
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_1]
-value = TESTKUDOS:1
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_5]
-value = TESTKUDOS:5
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
diff --git a/src/cli/test_anastasis_reducer_2.conf
b/src/cli/test_anastasis_reducer_2.conf
index 40a2a10..3dcfd27 100644
--- a/src/cli/test_anastasis_reducer_2.conf
+++ b/src/cli/test_anastasis_reducer_2.conf
@@ -1,254 +1,9 @@
-# This file is in the public domain.
-#
-[PATHS]
-# Persistant data storage for the testcase
-TALER_TEST_HOME = test_anastasis_api_home/
-
-# Persistant data storage
-TALER_DATA_HOME = $TALER_TEST_HOME/.local/share/taler/
-
-# Configuration files
-TALER_CONFIG_HOME = $TALER_TEST_HOME/.config/taler/
-
-# Cached data, no big deal if lost
-TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
-
-[taler]
-# What currency do we use?
-#currency = EUR
-currency = TESTKUDOS
-#CURRENCY_ROUND_UNIT = EUR:0.01
-#CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
-[bank]
-HTTP_PORT = 8082
-#BASE_URL = https://bank.test.taler.net/
-
-##########################################
-# Configuration for Anastasis #
-##########################################
+@INLINE@ test_reducer.conf
[anastasis]
-PORT = 8088
-
-DB = postgres
-
-# Base URL of anastasis.
-# BASE_URL = http://localhost:8086/
-
-# Where does our payment backend run? Must match PORT under [merchant]
-PAYMENT_BACKEND_URL = http://localhost:9966/
-
-# Annual fee we charge.
-#ANNUAL_FEE = EUR:4.99
-ANNUAL_FEE = TESTKUDOS:4.99
-#ANNUAL_FEE = TESTKUDOS:0
-#ANNUAL_FEE = EUR:0
-
-# Cost of authentication by question
-#QUESTION_COST = EUR:0
-QUESTION_COST = TESTKUDOS:0
-
-# Insurance
-INSURANCE = TESTKUDOS:1.0
-
-# Cost of authentication by file (only for testing purposes)
-FILE_COST = TESTKUDOS:1.0
-
-# Upload limit
-UPLOAD_LIMIT_MB = 1
-
-SUPPORTED_METHODS = question
-
-# Server salt 16 Byte
-SERVER_SALT = CUfO1KGOKYIFlFQg
+PORT = 8087
+SERVER_SALT = BUfO1KGOKYIFlFQg
+BUSINESS_NAME = "Data loss #2 Inc."
-# This specifies which database the postgres backend uses.
[stasis-postgres]
-CONFIG = postgres:///anastasischeck2
-
-##########################################
-# Configuration for the merchant backend #
-##########################################
-
-[test]
-INSTANCES = default tor
-
-[merchant]
-
-# Which port do we run the backend on? (HTTP server)
-PORT = 9966
-
-# How quickly do we want the exchange to send us our money?
-# Used only if the frontend does not specify a value.
-WIRE_TRANSFER_DELAY = 0 s
-
-# Which plugin (backend) do we use for the DB.
-DB = postgres
-
-# Default choice for maximum wire fee.
-DEFAULT_MAX_WIRE_FEE = TESTKUDOS:0.10
-
-# Default choice for maximum deposit fee.
-DEFAULT_MAX_DEPOSIT_FEE = TESTKUDOS:0.10
-
-
-# This specifies which database the postgres backend uses.
-[merchantdb-postgres]
-CONFIG = postgres:///talercheck
-
-# Different instances operated by this merchant:
-[instance-default]
-KEYFILE = ${TALER_CONFIG_HOME}/merchant/default.priv
-NAME = Kudos Inc.
-
-# Sections starting with "exchange-" specify trusted exchanges
-# (by the merchant)
-[merchant-exchange-default]
-#MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-#EXCHANGE_BASE_URL = http://localhost:8081/
-MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
-EXCHANGE_BASE_URL = https://exchange.test.taler.net/
-#CURRENCY = EUR
-CURRENCY = TESTKUDOS
-
-
-
-# only fixes skips.
-[auditor]
-BASE_URL = http://the.auditor/
-#BASE_URL = https://auditor.test.taler.net/
-#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
-# If currency does not match [TALER] section, the auditor
-# will be ignored!
-CURRENCY = TESTKUDOS
-
-# Where do we store the auditor's private key?
-AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv
-
-# Auditors must be in sections "auditor-", the rest of the section
-# name could be anything.
-[auditor-ezb]
-# Informal name of the auditor. Just for the user.
-NAME = European Central Bank
-
-# URL of the auditor (especially for in the future, when the
-# auditor offers an automated issue reporting system).
-# Not really used today.
-URL = http://taler.ezb.eu/
-
-# This is the important bit: the signing key of the auditor.
-PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
-
-# Which currency is this auditor trusted for?
-CURRENCY = TESTKUDOS
-
-
-###################################################
-# Configuration for the exchange for the testcase #
-###################################################
-
-[exchange_keys]
-
-# how long is one signkey valid?
-signkey_duration = 4 weeks
-
-# how long are the signatures with the signkey valid?
-legal_duration = 2 years
-
-# how long do we generate denomination and signing keys
-# ahead of time?
-lookahead_sign = 32 weeks 1 day
-
-# how long do we provide to clients denomination and signing keys
-# ahead of time?
-lookahead_provide = 4 weeks 1 day
-
-
-[exchange]
-# How to access our database
-DB = postgres
-
-# HTTP port the exchange listens to
-#PORT = 8081
-
-# Our public key
-MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-
-# Base URL of the exchange.
-BASE_URL = "http://localhost:8081/"
-#BASE_URL = https://exchange.test.taler.net/
-
-# Network configuration for the normal API/service HTTP server
-# serve via tcp socket (on PORT)
-SERVE = tcp
-
-[exchange-offline]
-
-# Where do we store the offline master private key of the exchange?
-MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-# Where do we store the TOFU key material?
-SECM_TOFU_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-
-[exchangedb-postgres]
-CONFIG = "postgres:///talercheck"
-
-[auditordb-postgres]
-CONFIG = "postgres:///talercheck"
-
-# Account of the EXCHANGE
-[exchange-account-exchange]
-# What is the exchange's bank account (with the "Taler Bank" demo system)?
-PAYTO_URI = "payto://x-taler-bank/localhost:8082/2"
-
-WIRE_GATEWAY_URL = "http://localhost:8082/2/"
-WIRE_GATEWAY_AUTH_METHOD = NONE
-
-ENABLE_DEBIT = YES
-ENABLE_CREDIT = YES
-
-[coin_eur_ct_1]
-value = TESTKUDOS:0.01
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.00
-fee_deposit = TESTKUDOS:0.00
-fee_refresh = TESTKUDOS:0.01
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_ct_10]
-value = TESTKUDOS:0.10
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_1]
-value = TESTKUDOS:1
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_5]
-value = TESTKUDOS:5
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
+CONFIG = postgres:///anastasischeck3
diff --git a/src/cli/test_anastasis_reducer_3.conf
b/src/cli/test_anastasis_reducer_3.conf
index eff0b06..63c38ff 100644
--- a/src/cli/test_anastasis_reducer_3.conf
+++ b/src/cli/test_anastasis_reducer_3.conf
@@ -1,255 +1,9 @@
-# This file is in the public domain.
-#
-[PATHS]
-# Persistant data storage for the testcase
-TALER_TEST_HOME = test_anastasis_api_home/
-
-# Persistant data storage
-TALER_DATA_HOME = $TALER_TEST_HOME/.local/share/taler/
-
-# Configuration files
-TALER_CONFIG_HOME = $TALER_TEST_HOME/.config/taler/
-
-# Cached data, no big deal if lost
-TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
-
-[taler]
-# What currency do we use?
-#currency = EUR
-currency = TESTKUDOS
-#CURRENCY_ROUND_UNIT = EUR:0.01
-#CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
-[bank]
-HTTP_PORT = 8082
-#BASE_URL = https://bank.test.taler.net/
-
-##########################################
-# Configuration for Anastasis #
-##########################################
+@INLINE@ test_reducer.conf
[anastasis]
-PORT = 8089
-
-DB = postgres
-
-# Base URL of anastasis.
-# BASE_URL = http://localhost:8086/
-
-# Where does our payment backend run? Must match PORT under [merchant]
-PAYMENT_BACKEND_URL = http://localhost:9966/
+PORT = 8088
+SERVER_SALT = CUfO1KGOKYIFlFQg
+BUSINESS_NAME = "Data loss #3 Inc."
-# Annual fee we charge.
-#ANNUAL_FEE = EUR:4.99
-#ANNUAL_FEE = TESTKUDOS:4.99
-ANNUAL_FEE = TESTKUDOS:0
-#ANNUAL_FEE = EUR:0
-
-# Cost of authentication by question
-#QUESTION_COST = EUR:0
-QUESTION_COST = TESTKUDOS:0
-
-# Insurance
-INSURANCE = TESTKUDOS:1.0
-
-# Cost of authentication by file (only for testing purposes)
-FILE_COST = TESTKUDOS:1.0
-
-# Server salt 16 Byte
-SERVER_SALT = DUfO1KGOKYIFlFQg
-
-# Upload limit
-UPLOAD_LIMIT_MB = 1
-
-SUPPORTED_METHODS = question
-
-# This specifies which database the postgres backend uses.
[stasis-postgres]
CONFIG = postgres:///anastasischeck3
-
-##########################################
-# Configuration for the merchant backend #
-##########################################
-
-[test]
-INSTANCES = default tor
-
-[merchant]
-
-# Which port do we run the backend on? (HTTP server)
-PORT = 9966
-
-# How quickly do we want the exchange to send us our money?
-# Used only if the frontend does not specify a value.
-WIRE_TRANSFER_DELAY = 0 s
-
-# Which plugin (backend) do we use for the DB.
-DB = postgres
-
-# Default choice for maximum wire fee.
-DEFAULT_MAX_WIRE_FEE = TESTKUDOS:0.10
-
-# Default choice for maximum deposit fee.
-DEFAULT_MAX_DEPOSIT_FEE = TESTKUDOS:0.10
-
-
-# This specifies which database the postgres backend uses.
-[merchantdb-postgres]
-CONFIG = postgres:///talercheck
-
-# Sections starting with "exchange-" specify trusted exchanges
-# (by the merchant)
-[merchant-exchange-default]
-#MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-#EXCHANGE_BASE_URL = http://localhost:8081/
-MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
-EXCHANGE_BASE_URL = https://exchange.test.taler.net/
-#CURRENCY = EUR
-CURRENCY = TESTKUDOS
-
-
-
-# only fixes skips.
-[auditor]
-BASE_URL = http://the.auditor/
-#BASE_URL = https://auditor.test.taler.net/
-#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
-# If currency does not match [TALER] section, the auditor
-# will be ignored!
-CURRENCY = TESTKUDOS
-
-# Where do we store the auditor's private key?
-AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv
-
-# Auditors must be in sections "auditor-", the rest of the section
-# name could be anything.
-[auditor-ezb]
-# Informal name of the auditor. Just for the user.
-NAME = European Central Bank
-
-# URL of the auditor (especially for in the future, when the
-# auditor offers an automated issue reporting system).
-# Not really used today.
-URL = http://taler.ezb.eu/
-
-# This is the important bit: the signing key of the auditor.
-PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
-
-# Which currency is this auditor trusted for?
-CURRENCY = TESTKUDOS
-
-
-###################################################
-# Configuration for the exchange for the testcase #
-###################################################
-
-[exchange_keys]
-
-# how long is one signkey valid?
-signkey_duration = 4 weeks
-
-# how long are the signatures with the signkey valid?
-legal_duration = 2 years
-
-# how long do we generate denomination and signing keys
-# ahead of time?
-lookahead_sign = 32 weeks 1 day
-
-# how long do we provide to clients denomination and signing keys
-# ahead of time?
-lookahead_provide = 4 weeks 1 day
-
-
-[exchange]
-# How to access our database
-DB = postgres
-
-# HTTP port the exchange listens to
-#PORT = 8081
-
-# Our public key
-MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-
-# Base URL of the exchange.
-BASE_URL = "http://localhost:8081/"
-#BASE_URL = https://exchange.test.taler.net/
-
-
-# Network configuration for the normal API/service HTTP server
-# serve via tcp socket (on PORT)
-SERVE = tcp
-
-
-[exchange-offline]
-
-# Where do we store the offline master private key of the exchange?
-MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-# Where do we store the TOFU key material?
-SECM_TOFU_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
-
-# END
-##############################################################
-
-
-[exchangedb-postgres]
-CONFIG = "postgres:///talercheck"
-
-[auditordb-postgres]
-CONFIG = "postgres:///talercheck"
-
-# Account of the EXCHANGE
-[exchange-account-exchange]
-# What is the exchange's bank account (with the "Taler Bank" demo system)?
-PAYTO_URI = "payto://x-taler-bank/localhost:8082/2"
-
-WIRE_GATEWAY_URL = "http://localhost:8082/2/"
-WIRE_GATEWAY_AUTH_METHOD = NONE
-
-ENABLE_DEBIT = YES
-ENABLE_CREDIT = YES
-
-
-[coin_eur_ct_1]
-value = TESTKUDOS:0.01
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.00
-fee_deposit = TESTKUDOS:0.00
-fee_refresh = TESTKUDOS:0.01
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_ct_10]
-value = TESTKUDOS:0.10
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_1]
-value = TESTKUDOS:1
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
-
-[coin_eur_5]
-value = TESTKUDOS:5
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = TESTKUDOS:0.01
-fee_deposit = TESTKUDOS:0.01
-fee_refresh = TESTKUDOS:0.03
-fee_refund = TESTKUDOS:0.01
-rsa_keysize = 1024
diff --git a/src/cli/test_anastasis_reducer_4.conf
b/src/cli/test_anastasis_reducer_4.conf
new file mode 100644
index 0000000..a6d590e
--- /dev/null
+++ b/src/cli/test_anastasis_reducer_4.conf
@@ -0,0 +1,9 @@
+@INLINE@ test_reducer.conf
+
+[anastasis]
+PORT = 8089
+SERVER_SALT = DUfO1KGOKYIFlFQg
+BUSINESS_NAME = "Data loss #4 Inc."
+
+[stasis-postgres]
+CONFIG = postgres:///anastasischeck4
diff --git a/src/cli/test_anastasis_reducer_select_continent.sh
b/src/cli/test_anastasis_reducer_select_continent.sh
index 318d6b2..daa11bd 100755
--- a/src/cli/test_anastasis_reducer_select_continent.sh
+++ b/src/cli/test_anastasis_reducer_select_continent.sh
@@ -41,7 +41,7 @@ echo " FOUND"
# Test continent selection in a backup state
echo -n "Test continent selection in a backup state ..."
-anastasis-reducer -a '{"continent": "Europe"}' select_continent
resources/00-backup.json $TFILE
+anastasis-reducer -a '{"continent": "Testcontinent"}' select_continent
resources/00-backup.json $TFILE
STATE=`jq -r -e .backup_state < $TFILE`
if test "$STATE" != "COUNTRY_SELECTING"
@@ -49,9 +49,9 @@ then
exit_fail "Expected new state to be COUNTRY_SELECTING, got $STATE"
fi
SELECTED_CONTINENT=`jq -r -e .selected_continent < $TFILE`
-if test "$SELECTED_CONTINENT" != "Europe"
+if test "$SELECTED_CONTINENT" != "Testcontinent"
then
- exit_fail "Expected selected continent to be Europe, got
$SELECTED_CONTINENT"
+ exit_fail "Expected selected continent to be Testcontinent, got
$SELECTED_CONTINENT"
fi
COUNTRIES=`jq -r -e .countries < $TFILE`
if test "$COUNTRIES" == NULL
@@ -62,7 +62,7 @@ echo " OK"
# Test continent selection in a recovery state
echo -n "Test continent selection in a recovery state ..."
-anastasis-reducer -a '{"continent": "Europe"}' select_continent
resources/00-recovery.json $TFILE
+anastasis-reducer -a '{"continent": "Testcontinent"}' select_continent
resources/00-recovery.json $TFILE
STATE=`jq -r -e .recovery_state < $TFILE`
if test "$STATE" != "COUNTRY_SELECTING"
@@ -76,9 +76,9 @@ jq -e .countries[0].name < $TFILE > /dev/null || exit_fail
"Expected new state t
jq -e .countries[0].currency < $TFILE > /dev/null || exit_fail "Expected new
state to include countries with currency"
SELECTED_CONTINENT=`jq -r -e .selected_continent < $TFILE`
-if test "$SELECTED_CONTINENT" != "Europe"
+if test "$SELECTED_CONTINENT" != "Testcontinent"
then
- exit_fail "Expected selected continent to be Europe, got
$SELECTED_CONTINENT"
+ exit_fail "Expected selected continent to be 'Testcontinent', got
$SELECTED_CONTINENT"
fi
COUNTRIES=`jq -r -e .countries < $TFILE`
diff --git a/src/cli/test_anastasis_reducer_select_country.sh
b/src/cli/test_anastasis_reducer_select_country.sh
index a0300e6..c033efd 100755
--- a/src/cli/test_anastasis_reducer_select_country.sh
+++ b/src/cli/test_anastasis_reducer_select_country.sh
@@ -4,13 +4,13 @@ set -eu
# Exit, with status code "skip" (no 'real' failure)
function exit_skip() {
- echo $1
+ echo " SKIP: $1"
exit 77
}
# Exit, with error message (hard failure)
function exit_fail() {
- echo $1
+ echo " FAIL: $1"
exit 1
}
@@ -21,15 +21,17 @@ function cleanup()
do
kill $n 2> /dev/null || true
done
- rm -f $SFILE $TFILE $UFILE $CONF_1 $CONF_2 $CONF_3 $CONF_4
+ rm -f $SFILE $TFILE $UFILE
wait
}
# Install cleanup handler (except for kill -9)
-CONF_1=`mktemp test_reducerXXXXXX_1.conf`
-CONF_2=`mktemp test_reducerXXXXXX_2.conf`
-CONF_3=`mktemp test_reducerXXXXXX_3.conf`
-CONF_4=`mktemp test_reducerXXXXXX_4.conf`
+CONF_1="test_anastasis_reducer_1.conf"
+CONF_2="test_anastasis_reducer_2.conf"
+CONF_3="test_anastasis_reducer_3.conf"
+CONF_4="test_anastasis_reducer_4.conf"
+
+
SFILE=`mktemp test_reducer_stateXXXXXX`
TFILE=`mktemp test_reducer_stateXXXXXX`
UFILE=`mktemp test_reducer_stateXXXXXX`
@@ -41,6 +43,10 @@ echo -n "Testing for jq"
jq -h > /dev/null || exit_skip "jq required"
echo " FOUND"
+echo -n "Testing for anastasis-reducer ..."
+anastasis-reducer -h > /dev/null || exit_skip "anastasis-reducer required"
+echo " FOUND"
+
echo -n "Testing for anastasis-httpd"
anastasis-httpd -h >/dev/null </dev/null || exit_skip " MISSING"
echo " FOUND"
@@ -49,30 +55,28 @@ echo " FOUND"
# Name of the Postgres database we will use for the script.
# Will be dropped, do NOT use anything that might be used
# elsewhere
-TARGET_DB=anastasischeck
-TARGET_DB_1=anastasischeck1
-TARGET_DB_2=anastasischeck2
-TARGET_DB_3=anastasischeck3
-
-# Configuration file will be edited, so we create one
-# from the template.
-cp test_anastasis_reducer.conf $CONF_1
-cp test_anastasis_reducer_1.conf $CONF_2
-cp test_anastasis_reducer_2.conf $CONF_3
-cp test_anastasis_reducer_3.conf $CONF_4
-
-# reset database
-dropdb $TARGET_DB >/dev/null 2>/dev/null || true
-createdb $TARGET_DB || exit_skip "Could not create database $TARGET_DB"
+TARGET_DB_1=`anastasis-config -c $CONF_1 -s stasis-postgres -o CONFIG | sed -e
"s/^postgres:\/\/\///"`
+TARGET_DB_2=`anastasis-config -c $CONF_2 -s stasis-postgres -o CONFIG | sed -e
"s/^postgres:\/\/\///"`
+TARGET_DB_3=`anastasis-config -c $CONF_3 -s stasis-postgres -o CONFIG | sed -e
"s/^postgres:\/\/\///"`
+TARGET_DB_4=`anastasis-config -c $CONF_4 -s stasis-postgres -o CONFIG | sed -e
"s/^postgres:\/\/\///"`
+
+echo -n "Initialize anastasis database ..."
dropdb $TARGET_DB_1 >/dev/null 2>/dev/null || true
createdb $TARGET_DB_1 || exit_skip "Could not create database $TARGET_DB_1"
+anastasis-dbinit -c $CONF_1 2> anastasis-dbinit_1.log
dropdb $TARGET_DB_2 >/dev/null 2>/dev/null || true
createdb $TARGET_DB_2 || exit_skip "Could not create database $TARGET_DB_2"
+anastasis-dbinit -c $CONF_2 2> anastasis-dbinit_2.log
dropdb $TARGET_DB_3 >/dev/null 2>/dev/null || true
createdb $TARGET_DB_3 || exit_skip "Could not create database $TARGET_DB_3"
+anastasis-dbinit -c $CONF_3 2> anastasis-dbinit_3.log
+dropdb $TARGET_DB_4 >/dev/null 2>/dev/null || true
+createdb $TARGET_DB_4 || exit_skip "Could not create database $TARGET_DB_4"
+anastasis-dbinit -c $CONF_4 2> anastasis-dbinit_4.log
-# Launch services
-echo "Launching anastasis service"
+echo " OK"
+
+echo -n "Launching anastasis service ..."
anastasis-httpd -c $CONF_1 2> anastasis-httpd_1.log &
anastasis-httpd -c $CONF_2 2> anastasis-httpd_2.log &
anastasis-httpd -c $CONF_3 2> anastasis-httpd_3.log &
@@ -100,21 +104,15 @@ if [ 1 != $OK ]
then
exit_skip "Failed to launch anastasis services"
fi
-
-echo " ANASTASIS SETUP DONE"
-echo " "
-echo " "
-echo " "
-echo "Beginning with actual reducer test"
+echo " OK"
# Test country selection in a backup state
-echo " "
-echo "Test country selection in a backup state"
+echo -n "Test country selection in a backup state ..."
./anastasis-reducer -b $SFILE
./anastasis-reducer -a '{"continent": "Europe"}' select_continent $SFILE $TFILE
./anastasis-reducer -a \
- '{"country": "Switzerland",
- "country_code": "ch",
+ '{"country": "Switzerland",
+ "country_code": "ch",
"currency":"TESTKUDOS"}' \
select_country $TFILE $UFILE
@@ -148,8 +146,10 @@ then
exit_fail "Expected authentication_providers array not to be NULL"
fi
+echo " OK"
+
# Test country selection in a recovery state
-echo "Test country selection in a recovery state"
+echo -n "Test country selection in a recovery state ..."
./anastasis-reducer -r $SFILE
./anastasis-reducer -a '{"continent": "Europe"}' select_continent $SFILE $TFILE
./anastasis-reducer -a '{"country": "Switzerland", "country_code": "ch",
"currency":"TESTKUDOS"}' select_country $TFILE $SFILE
@@ -184,4 +184,7 @@ then
exit_fail "Expected authentication_providers array not to be NULL"
fi
+echo "OK"
+
+
exit 0
diff --git a/src/cli/test_reducer.conf b/src/cli/test_reducer.conf
index 32e91a0..154fe00 100644
--- a/src/cli/test_reducer.conf
+++ b/src/cli/test_reducer.conf
@@ -1,3 +1,26 @@
+[PATHS]
+TALER_HOME = ${PWD}/test_reducer_home/
+TALER_DATA_HOME = $TALER_HOME/.local/share/taler/
+TALER_CONFIG_HOME = $TALER_HOME/.config/taler/
+TALER_CACHE_HOME = $TALER_HOME/.cache/taler/
+TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/taler-system-runtime/
+
+[taler]
+CURRENCY = TESTKUDOS
+CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
+
+[anastasis]
+DB = postgres
+PAYMENT_BACKEND_URL = http://localhost:9966/
+ANNUAL_FEE = TESTKUDOS:4.99
+TRUTH_UPLOAD_FEE = TESTKUDOS:0.01
+UPLOAD_LIMIT_MB = 1
+INSURANCE = TESTKUDOS:1.0
+
+[authorization-question]
+COST = TESTKUDOS:0.0
+
+
[exchange]
MAX_KEYS_CACHING = forever
DB = postgres
@@ -7,11 +30,11 @@ UNIXPATH = ${TALER_RUNTIME_DIR}/exchange.http
UNIXPATH_MODE = 660
PORT = 8081
BASE_URL = http://localhost:8081/
-SIGNKEY_DURATION = 4 weeks
+SIGNKEY_DURATION = 2 weeks
SIGNKEY_LEGAL_DURATION = 2 years
LEGAL_DURATION = 2 years
-LOOKAHEAD_SIGN = 32 weeks 1 day
-LOOKAHEAD_PROVIDE = 4 weeks 1 day
+LOOKAHEAD_SIGN = 3 weeks 1 day
+LOOKAHEAD_PROVIDE = 2 weeks 1 day
KEYDIR = ${TALER_DATA_HOME}/exchange/live-keys/
REVOCATION_DIR = ${TALER_DATA_HOME}/exchange/revocations/
TERMS_ETAG = 0
@@ -48,13 +71,6 @@ TINY_AMOUNT = TESTKUDOS:0.01
AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv
BASE_URL = "http://localhost:8083/"
-[PATHS]
-TALER_HOME = ${PWD}/test_reducer_home/
-TALER_DATA_HOME = $TALER_HOME/.local/share/taler/
-TALER_CONFIG_HOME = $TALER_HOME/.config/taler/
-TALER_CACHE_HOME = $TALER_HOME/.cache/taler/
-TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/taler-system-runtime/
-
[bank]
DATABASE = postgres:///taler-auditor-basedb
MAX_DEBT = TESTKUDOS:50.0
@@ -69,10 +85,6 @@ SERVE = http
IDLE_RESERVE_EXPIRATION_TIME = 4 weeks
LEGAL_RESERVE_EXPIRATION_TIME = 7 years
-[taler]
-CURRENCY = TESTKUDOS
-CURRENCY_ROUND_UNIT = TESTKUDOS:0.01
-
[exchange-account-1]
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
enable_debit = yes
@@ -182,7 +194,3 @@ fee_deposit = TESTKUDOS:0.01
fee_refresh = TESTKUDOS:0.03
fee_refund = TESTKUDOS:0.01
rsa_keysize = 1024
-
-[benchmark]
-BANK_DETAILS = bank_details.json
-MERCHANT_DETAILS = merchant_details.json
--
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: switch tests to test country,
gnunet <=