libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 7aea44fdd6bc3abbd21dff21fea077e5f9101ccb
parent 637806676b31f5b7d8f6ee368fc440bb1618c6b0
Author: MS <ms@taler.net>
Date:   Mon, 18 May 2020 12:15:33 +0200

Commentig out the filter on dates.

Plus adapting the test runner to the new Sandbox API.

Diffstat:
Mintegration-tests/test-ebics.py | 6+++---
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 9+++++----
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 4+---
3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/integration-tests/test-ebics.py b/integration-tests/test-ebics.py @@ -120,7 +120,7 @@ for i in range(10): #0.a assertResponse( post( - "http://localhost:5000/admin/ebics-host", + "http://localhost:5000/admin/ebics/host", json=dict( hostID=HOST_ID, ebicsVersion=EBICS_VERSION @@ -131,7 +131,7 @@ assertResponse( #0.b assertResponse( post( - "http://localhost:5000/admin/ebics-subscriber", + "http://localhost:5000/admin/ebics/subscribers", json=dict( hostID=HOST_ID, partnerID=PARTNER_ID, @@ -143,7 +143,7 @@ assertResponse( #0.c assertResponse( post( - "http://localhost:5000/admin/ebics-subscriber/bank-account", + "http://localhost:5000/admin/ebics/bank-accounts", json=dict( subscriber=dict( hostID=HOST_ID, diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -201,7 +201,6 @@ fun buildCamtString(type: Int, history: MutableList<RawPayment>): MutableList<St element("CreDtTm") { text(zonedDateTime) } - element("Acct") { // mandatory account identifier element("Id/IBAN") { @@ -408,14 +407,16 @@ private fun constructCamtResponse( val dateRange = (header.static.orderDetails?.orderParams as EbicsRequest.StandardOrderParams).dateRange val (start: DateTime, end: DateTime) = if (dateRange != null) { Pair(DateTime(dateRange.start.toGregorianCalendar().time), DateTime(dateRange.end.toGregorianCalendar().time)) - } else Pair(DateTime(0), DateTime.now()) + } else Pair(parseDashedDate("1970-01-01"), DateTime.now()) val history = mutableListOf<RawPayment>() val bankAccount = getBankAccountFromSubscriber(subscriber) transaction { PaymentEntity.find { PaymentsTable.creditorIban eq bankAccount.iban or - (PaymentsTable.debitorIban eq bankAccount.iban) and - (PaymentsTable.date.between(start.millis, end.millis)) + (PaymentsTable.debitorIban eq bankAccount.iban) /** + FIXME! + and (PaymentsTable.date.between(start.millis, end.millis)) + */ }.forEach { history.add( RawPayment( diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -181,9 +181,7 @@ fun main() { label = body.label } } - call.respondText( - "Bank account created, and associated to the subscriber" - ) + call.respondText("Bank account created") return@post } /**