libeufin

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

commit 49469cea6776ba0cd0142794d2517284df45b5a2
parent bdd8291f73833389c50ca5e540881279222c5863
Author: Florian Dold <florian@dold.me>
Date:   Wed, 13 Jan 2021 17:16:16 +0100

remove deprecated endpoint

Diffstat:
Mintegration-tests/start-testenv.py | 8++++----
Mintegration-tests/tests.py | 2+-
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 27---------------------------
3 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/integration-tests/start-testenv.py b/integration-tests/start-testenv.py @@ -99,25 +99,25 @@ startSandbox() # 0.a Create EBICS hosts assertResponse( post( - "http://localhost:5000/admin/ebics/host", + "http://localhost:5000/admin/ebics/hosts", json=dict(hostID=BC1_HOST_ID, ebicsVersion=EBICS_VERSION), ) ) assertResponse( post( - "http://localhost:5000/admin/ebics/host", + "http://localhost:5000/admin/ebics/hosts", json=dict(hostID=BC2_HOST_ID, ebicsVersion=EBICS_VERSION), ) ) assertResponse( post( - "http://localhost:5000/admin/ebics/host", + "http://localhost:5000/admin/ebics/hosts", json=dict(hostID=BC3_HOST_ID, ebicsVersion=EBICS_VERSION), ) ) assertResponse( post( - "http://localhost:5000/admin/ebics/host", + "http://localhost:5000/admin/ebics/hosts", json=dict(hostID=BC4_HOST_ID, ebicsVersion=EBICS_VERSION), ) ) diff --git a/integration-tests/tests.py b/integration-tests/tests.py @@ -35,7 +35,7 @@ def prepareSandbox(): # make ebics host at sandbox assertResponse( post( - f"{PERSONA.banking.bank_base_url}/admin/ebics/host", + f"{PERSONA.banking.bank_base_url}/admin/ebics/hosts", json=dict(hostID=PERSONA.ebics.host, ebicsVersion=PERSONA.ebics.version), ) ) diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -389,33 +389,6 @@ fun serverMain(dbName: String, port: Int) { } /** * Creates a new EBICS host. - * - * FIXME: This endpoint is deprecated. /hosts should be used instead. - */ - post("/admin/ebics/host") { - val req = call.receive<EbicsHostCreateRequest>() - val pairA = CryptoUtil.generateRsaKeyPair(2048) - val pairB = CryptoUtil.generateRsaKeyPair(2048) - val pairC = CryptoUtil.generateRsaKeyPair(2048) - transaction { - EbicsHostEntity.new { - this.ebicsVersion = req.ebicsVersion - this.hostId = req.hostID - this.authenticationPrivateKey = ExposedBlob(pairA.private.encoded) - this.encryptionPrivateKey = ExposedBlob(pairB.private.encoded) - this.signaturePrivateKey = ExposedBlob(pairC.private.encoded) - } - } - call.respondText( - "Host '${req.hostID}' created.", - ContentType.Text.Plain, - HttpStatusCode.OK - ) - return@post - } - - /** - * Creates a new EBICS host. */ post("/admin/ebics/hosts") { val req = call.receive<EbicsHostCreateRequest>()