libeufin

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

commit e139e6bb9213718968e574adb984a675a7e4cd48
parent 30d6541149f8db5cc445506ecb18a026decfb255
Author: MS <ms@taler.net>
Date:   Thu,  5 Oct 2023 17:45:26 +0200

Adding test-case for /history/incoming loop bug.

Diffstat:
Mbank/src/test/kotlin/TalerApiTest.kt | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/bank/src/test/kotlin/TalerApiTest.kt b/bank/src/test/kotlin/TalerApiTest.kt @@ -208,6 +208,29 @@ class TalerApiTest { } /** + * FIXME: outlines loop bug in the /history/incoming handler. + */ + @Test + fun historyLoop() { + val (db, ctx) = commonSetup() + // Give Foo reasonable debt allowance: + assert( + db.bankAccountSetMaxDebt( + 1L, + TalerAmount(1000000, 0, "KUDOS") + ) + ) + db.bankTransactionCreate(genTx("bogus foobar")).assertSuccess() + testApplication { + application { + corebankWebApp(db, ctx) + } + client.get("/accounts/bar/taler-wire-gateway/history/incoming?delta=1") { + basicAuth("bar", "secret") + }.apply { println(this.bodyAsText()) } + } + } + /** * Testing the /history/incoming call from the TWG API. */ @Test