libeufin

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

commit 3a306f41e2f14fa4e65b87817ce3aeef990be7cc
parent 21ef7c12f4a5bf35e528aaf367f88e777bf6c855
Author: Florian Dold <dold@taler.net>
Date:   Sun,  6 Sep 2026 12:41:06 +0200

EBICS tests: initialize the database and use UTC mock dates

Create the EBISync schema before configuring EBICS. Use UTC for the mock
BTD response date, matching the client date at local midnight.

Diffstat:
Mlibeufin-ebics/src/main/kotlin/tech/libeufin/ebics/test/ebics.kt | 6+++---
Mlibeufin-ebisync/src/test/kotlin/EbicsTest.kt | 5++---
2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/libeufin-ebics/src/main/kotlin/tech/libeufin/ebics/test/ebics.kt b/libeufin-ebics/src/main/kotlin/tech/libeufin/ebics/test/ebics.kt @@ -32,6 +32,7 @@ import kotlin.test.* import java.security.interfaces.RSAPrivateCrtKey import java.security.interfaces.RSAPublicKey import java.time.LocalDate +import java.time.ZoneOffset class EbicsState { private val bankSignKey: RSAPrivateCrtKey = CryptoUtil.genRSAPrivate(2048) @@ -391,7 +392,7 @@ class EbicsState { } fun btdNoData(body: String): ByteArray = btdDateCheck(body, null) - fun btdNoDataNow(body: String): ByteArray = btdDateCheck(body, LocalDate.now()) + fun btdNoDataNow(body: String): ByteArray = btdDateCheck(body, LocalDate.now(ZoneOffset.UTC)) fun btdNoDataPinned(body: String): ByteArray = btdDateCheck(body, LocalDate.parse("2024-06-05")) fun btuInit(body: String): ByteArray { @@ -482,4 +483,4 @@ class EbicsState { fun failure(body: String): ByteArray { throw Exception("Not reachable") } -} -\ No newline at end of file +} diff --git a/libeufin-ebisync/src/test/kotlin/EbicsTest.kt b/libeufin-ebisync/src/test/kotlin/EbicsTest.kt @@ -62,7 +62,7 @@ class EbicsTest { } @Test - fun setup() { + fun setup() = setup { _, _ -> ebicsSetup() } -} -\ No newline at end of file +}