aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-09-11 00:08:07 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2019-09-11 00:46:30 +0200
commitef98a68ffaa9117aac8b12ef3663e284a01217b8 (patch)
tree3a073f5caf64928a3cf00da9db71ea2ad6026acd
parentee6d7d75d946f1771d5ddda8d654680aa7e80d32 (diff)
downloadexchange-ef98a68ffaa9117aac8b12ef3663e284a01217b8.tar.gz
exchange-ef98a68ffaa9117aac8b12ef3663e284a01217b8.zip
fix bank-lib test.
-rw-r--r--src/bank-lib/test_bank_api_NEW.c25
-rw-r--r--src/include/taler_testing_bank_lib.h4
2 files changed, 5 insertions, 24 deletions
diff --git a/src/bank-lib/test_bank_api_NEW.c b/src/bank-lib/test_bank_api_NEW.c
index a2f776239..5c7920b76 100644
--- a/src/bank-lib/test_bank_api_NEW.c
+++ b/src/bank-lib/test_bank_api_NEW.c
@@ -81,7 +81,6 @@ run (void *cls,
81 NULL, 81 NULL,
82 1), 82 1),
83 83
84
85 /* WARNING: old API has expected http response code among 84 /* WARNING: old API has expected http response code among
86 * the parameters, although it was always set as '200 OK' */ 85 * the parameters, although it was always set as '200 OK' */
87 TALER_TESTING_cmd_fakebank_transfer_with_subject 86 TALER_TESTING_cmd_fakebank_transfer_with_subject
@@ -149,20 +148,9 @@ run (void *cls,
149 "debit-1", 148 "debit-1",
150 5), 149 5),
151 150
152 TALER_TESTING_cmd_check_bank_transfer_with_ref ("expect-2d",
153 "credit-2"),
154
155 TALER_TESTING_cmd_check_bank_transfer_with_ref ("expect-2c",
156 "debit-2"),
157
158 TALER_TESTING_cmd_check_bank_transfer_with_ref ("expect-1",
159 "debit-1"),
160
161 TALER_TESTING_cmd_check_bank_empty ("expect-empty"),
162
163 TALER_TESTING_cmd_fakebank_transfer_with_subject 151 TALER_TESTING_cmd_fakebank_transfer_with_subject
164 ("credit-for-reject-1", 152 ("credit-for-reject-1",
165 "KUDOS:5.01", 153 "KUDOS:1.01",
166 bank_url, 154 bank_url,
167 BANK_ACCOUNT_NUMBER, 155 BANK_ACCOUNT_NUMBER,
168 EXCHANGE_ACCOUNT_NUMBER, 156 EXCHANGE_ACCOUNT_NUMBER,
@@ -192,12 +180,6 @@ run (void *cls,
192 NULL, 180 NULL,
193 5), 181 5),
194 182
195 TALER_TESTING_cmd_check_bank_transfer_with_ref
196 ("expect-credit-reject-1",
197 "credit-for-reject-1"),
198
199 TALER_TESTING_cmd_check_bank_empty ("expect-empty-2"),
200
201 /** 183 /**
202 * End the suite. Fixme: better to have a label for this 184 * End the suite. Fixme: better to have a label for this
203 * too, as it shows a "(null)" token on logs. 185 * too, as it shows a "(null)" token on logs.
@@ -219,17 +201,15 @@ main (int argc,
219 char *const *argv) 201 char *const *argv)
220{ 202{
221 int rv; 203 int rv;
222
223 /* These environment variables get in the way... */ 204 /* These environment variables get in the way... */
224 unsetenv ("XDG_DATA_HOME"); 205 unsetenv ("XDG_DATA_HOME");
225 unsetenv ("XDG_CONFIG_HOME"); 206 unsetenv ("XDG_CONFIG_HOME");
226 GNUNET_log_setup ("test-bank-api-with-fakebank-new", 207 GNUNET_log_setup ("test-bank-api-with-(fake)bank-new",
227 "DEBUG", 208 "DEBUG",
228 NULL); 209 NULL);
229 210
230 WITH_FAKEBANK = TALER_TESTING_has_in_name (argv[0], 211 WITH_FAKEBANK = TALER_TESTING_has_in_name (argv[0],
231 "_with_fakebank"); 212 "_with_fakebank");
232
233 if (GNUNET_YES == WITH_FAKEBANK) 213 if (GNUNET_YES == WITH_FAKEBANK)
234 { 214 {
235 TALER_LOG_DEBUG ("Running against the Fakebank.\n"); 215 TALER_LOG_DEBUG ("Running against the Fakebank.\n");
@@ -243,6 +223,7 @@ main (int argc,
243 } 223 }
244 else 224 else
245 { 225 {
226 TALER_LOG_DEBUG ("Running against the Pybank.\n");
246 if (NULL == (bank_url = TALER_TESTING_prepare_bank 227 if (NULL == (bank_url = TALER_TESTING_prepare_bank
247 (CONFIG_FILE))) 228 (CONFIG_FILE)))
248 { 229 {
diff --git a/src/include/taler_testing_bank_lib.h b/src/include/taler_testing_bank_lib.h
index 72176d445..535fd2e9c 100644
--- a/src/include/taler_testing_bank_lib.h
+++ b/src/include/taler_testing_bank_lib.h
@@ -42,8 +42,8 @@
42#define EXCHANGE_USERNAME "Exchange" 42#define EXCHANGE_USERNAME "Exchange"
43#define EXCHANGE_PASSWORD "x" 43#define EXCHANGE_PASSWORD "x"
44#define USER_ACCOUNT_NUMBER 3 44#define USER_ACCOUNT_NUMBER 3
45#define USER_USERNAME "user3" 45#define USER_USERNAME "Tor"
46#define USER_PASSWORD "pass3" 46#define USER_PASSWORD "x"
47 47
48 48
49/* ********************* Helper functions ********************* */ 49/* ********************* Helper functions ********************* */