From 5de28f6a6be9caa66132a329aef5b97d6071effc Mon Sep 17 00:00:00 2001 From: MS Date: Mon, 16 Jan 2023 21:06:27 +0100 Subject: adapting tests to latest change --- cli/tests/circuit_test.sh | 4 ++-- nexus/src/test/kotlin/SandboxCircuitApiTest.kt | 6 ++++-- sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cli/tests/circuit_test.sh b/cli/tests/circuit_test.sh index 4d7bb5d0..971e664d 100755 --- a/cli/tests/circuit_test.sh +++ b/cli/tests/circuit_test.sh @@ -55,7 +55,7 @@ echo -n Create a cash-out operation... CASHOUT_RESP=$(./libeufin-cli \ sandbox --sandbox-url http://localhost:5000/ \ demobank \ - circuit-cashout --amount-debit=EUR:1 --amount-credit=CHF:0.95) + circuit-cashout --tan-channel file --amount-debit=EUR:1 --amount-credit=CHF:0.95) echo DONE echo -n Extract the cash-out UUID... CASHOUT_UUID=$(echo ${CASHOUT_RESP} | jq --raw-output '.uuid') @@ -85,7 +85,7 @@ echo -n Create another cash-out operation... CASHOUT_RESP=$(./libeufin-cli \ sandbox --sandbox-url http://localhost:5000/ \ demobank \ - circuit-cashout --amount-debit=EUR:1 --amount-credit=CHF:0.95) + circuit-cashout --tan-channel file --amount-debit=EUR:1 --amount-credit=CHF:0.95) CASHOUT_UUID=$(echo ${CASHOUT_RESP} | jq --raw-output '.uuid') echo DONE echo -n Confirm the last cash-out operation... diff --git a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt index 8d156393..49e54b85 100644 --- a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt +++ b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt @@ -108,7 +108,8 @@ class SandboxCircuitApiTest { basicAuth("shop", "secret") setBody("""{ "amount_debit": "TESTKUDOS:20", - "amount_credit": "KUDOS:19" + "amount_credit": "KUDOS:19", + "tan_channel": "file" }""".trimIndent()) } assert(R.status.value == HttpStatusCode.Accepted.value) @@ -146,7 +147,8 @@ class SandboxCircuitApiTest { basicAuth("shop", "secret") setBody("""{ "amount_debit": "TESTKUDOS:20", - "amount_credit": "KUDOS:19" + "amount_credit": "KUDOS:19", + "tan_channel": "file" }""".trimIndent()) } assert(R.status.value == HttpStatusCode.Accepted.value) diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt index 906ea637..48f22ca9 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -515,7 +515,7 @@ val sandboxApp: Application.() -> Unit = { } // Not necessarily the bank's fault. exception { call, cause -> - logger.debug("Exception while handling '${call.request.uri}', ${cause.reason}") + logger.error("Exception while handling '${call.request.uri}', ${cause.reason}") call.respond( cause.statusCode, SandboxErrorJson( @@ -528,7 +528,7 @@ val sandboxApp: Application.() -> Unit = { } // Not necessarily the bank's fault. exception { call, cause -> - logger.debug("Exception while handling '${call.request.uri}', ${cause.reason}") + logger.error("Exception while handling '${call.request.uri}', ${cause.reason}") call.respond( cause.statusCode, SandboxErrorJson( @@ -557,7 +557,7 @@ val sandboxApp: Application.() -> Unit = { "Did not find bad request details." ) } - logger.debug(errorMessage) + logger.error(errorMessage) call.respond( HttpStatusCode.BadRequest, SandboxErrorJson( -- cgit v1.2.3