diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-01-17 20:04:58 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-01-17 20:04:58 +0100 |
commit | f7742d1a5ac891f0fc2cb162d8c94daa37eb9fd2 (patch) | |
tree | 5a8b614f6b271f4186e3ddee74481b174984961a | |
parent | 8ce939cad97b049699b6779cc5902e8cf5c2bf41 (diff) | |
download | anastasis-f7742d1a5ac891f0fc2cb162d8c94daa37eb9fd2.tar.gz anastasis-f7742d1a5ac891f0fc2cb162d8c94daa37eb9fd2.zip |
-fix Taler v0.9.x compatibility issues in test
-rw-r--r-- | src/backend/anastasis-httpd_truth-upload.c | 1 | ||||
-rwxr-xr-x | src/cli/test_anastasis_reducer_enter_secret.sh | 12 | ||||
-rw-r--r-- | src/restclient/anastasis_api_truth_store.c | 10 |
3 files changed, 15 insertions, 8 deletions
diff --git a/src/backend/anastasis-httpd_truth-upload.c b/src/backend/anastasis-httpd_truth-upload.c index b8d2a84..362d7e1 100644 --- a/src/backend/anastasis-httpd_truth-upload.c +++ b/src/backend/anastasis-httpd_truth-upload.c | |||
@@ -415,7 +415,6 @@ check_payment_cb (void *cls, | |||
415 | "description", "challenge storage fee", | 415 | "description", "challenge storage fee", |
416 | "quantity", (json_int_t) tuc->years_to_pay, | 416 | "quantity", (json_int_t) tuc->years_to_pay, |
417 | "unit", "years", | 417 | "unit", "years", |
418 | |||
419 | "order_id", | 418 | "order_id", |
420 | order_id); | 419 | order_id); |
421 | GNUNET_free (order_id); | 420 | GNUNET_free (order_id); |
diff --git a/src/cli/test_anastasis_reducer_enter_secret.sh b/src/cli/test_anastasis_reducer_enter_secret.sh index 39529d7..2103679 100755 --- a/src/cli/test_anastasis_reducer_enter_secret.sh +++ b/src/cli/test_anastasis_reducer_enter_secret.sh | |||
@@ -213,7 +213,7 @@ taler-exchange-offline -c $CONF \ | |||
213 | sign \ | 213 | sign \ |
214 | enable-account payto://x-taler-bank/localhost/Exchange \ | 214 | enable-account payto://x-taler-bank/localhost/Exchange \ |
215 | enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \ | 215 | enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \ |
216 | wire-fee now x-taler-bank TESTKUDOS:0.01 TESTKUDOS:0.01 TESTKUDOS:0.01 \ | 216 | wire-fee now x-taler-bank TESTKUDOS:0.01 TESTKUDOS:0.01 \ |
217 | upload &> taler-exchange-offline.log | 217 | upload &> taler-exchange-offline.log |
218 | 218 | ||
219 | echo -n "." | 219 | echo -n "." |
@@ -268,7 +268,7 @@ echo "OK" | |||
268 | echo -n "Configuring merchant instance ..." | 268 | echo -n "Configuring merchant instance ..." |
269 | # Setup merchant | 269 | # Setup merchant |
270 | 270 | ||
271 | curl -H "Content-Type: application/json" -X POST -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms" : 3600000},"default_pay_delay":{"d_ms": 3600000}}' http://localhost:9966/management/instances | 271 | curl -H "Content-Type: application/json" -X POST -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us" : 3600000000},"default_pay_delay":{"d_us": 3600000000}}' http://localhost:9966/management/instances |
272 | 272 | ||
273 | 273 | ||
274 | echo " DONE" | 274 | echo " DONE" |
@@ -289,14 +289,14 @@ fi | |||
289 | echo " DONE" | 289 | echo " DONE" |
290 | echo -en $COLOR$BOLD"Test expiration change ..."$NORM$NOCOLOR | 290 | echo -en $COLOR$BOLD"Test expiration change ..."$NORM$NOCOLOR |
291 | 291 | ||
292 | MILLIS=`date '+%s'`000 | 292 | SECS=`date '+%s'` |
293 | # Use 156 days into the future to get 1 year | 293 | # Use 156 days into the future to get 1 year |
294 | MILLIS=`expr $MILLIS + 13478400000` | 294 | SECS=`expr $SECS + 13478400` |
295 | 295 | ||
296 | $PREFIX anastasis-reducer -a \ | 296 | $PREFIX anastasis-reducer -a \ |
297 | "$(jq -n ' | 297 | "$(jq -n ' |
298 | {"expiration": { "t_ms" : $MSEC } }' \ | 298 | {"expiration": { "t_s" : $SEC } }' \ |
299 | --argjson MSEC $MILLIS | 299 | --argjson SEC $SECS |
300 | )" \ | 300 | )" \ |
301 | update_expiration $TFILE $UFILE | 301 | update_expiration $TFILE $UFILE |
302 | 302 | ||
diff --git a/src/restclient/anastasis_api_truth_store.c b/src/restclient/anastasis_api_truth_store.c index c1cf634..855ad5a 100644 --- a/src/restclient/anastasis_api_truth_store.c +++ b/src/restclient/anastasis_api_truth_store.c | |||
@@ -169,10 +169,18 @@ handle_truth_store_finished (void *cls, | |||
169 | ud.ec = TALER_JSON_get_error_code2 (data, | 169 | ud.ec = TALER_JSON_get_error_code2 (data, |
170 | data_size); | 170 | data_size); |
171 | break; | 171 | break; |
172 | case MHD_HTTP_BAD_GATEWAY: | ||
173 | ud.ec = TALER_JSON_get_error_code2 (data, | ||
174 | data_size); | ||
175 | break; | ||
172 | default: | 176 | default: |
173 | GNUNET_break (0); | ||
174 | ud.ec = TALER_JSON_get_error_code2 (data, | 177 | ud.ec = TALER_JSON_get_error_code2 (data, |
175 | data_size); | 178 | data_size); |
179 | GNUNET_break (0); | ||
180 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
181 | "Unexpected HTTP status code %u/%d\n", | ||
182 | (unsigned int) response_code, | ||
183 | ud.ec); | ||
176 | break; | 184 | break; |
177 | } | 185 | } |
178 | tso->cb (tso->cb_cls, | 186 | tso->cb (tso->cb_cls, |