libeufin

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

commit 0a176158746167e5fb4fc7c2db3f1df031e80e83
parent 6024130ab85171528bff4f57d8ac31a1a06994d2
Author: MS <ms@taler.net>
Date:   Thu, 26 Oct 2023 18:33:57 +0200

nexus: implementing --check-full-config

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt | 15++++++++++++++-
Dnexus/src/test/kotlin/pain001.xml | 64----------------------------------------------------------------
2 files changed, 14 insertions(+), 65 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSetup.kt @@ -428,7 +428,20 @@ class EbicsSetup: CliktCommand("Set up the EBICS subscriber") { override fun run() { val cfg = extractEbicsConfig(this.configFile) if (checkFullConfig) { - throw NotImplementedError("--check-full-config flag not implemented") + doOrFail { + cfg.config.requireString("nexus-ebics-submit", "frequency") + cfg.config.requireString("nexus-ebics-fetch", "frequency") + cfg.config.requireString("nexus-ebics-fetch", "statement-log-directory") + cfg.config.requireString("nexus-httpd", "port") + cfg.config.requireString("nexus-httpd", "unixpath") + cfg.config.requireString("nexus-httpd", "serve") + cfg.config.requireString("nexus-httpd-wire-gateway-facade", "enabled") + cfg.config.requireString("nexus-httpd-wire-gateway-facade", "auth_method") + cfg.config.requireString("nexus-httpd-wire-gateway-facade", "auth_token") + cfg.config.requireString("nexus-httpd-revenue-facade", "enabled") + cfg.config.requireString("nexus-httpd-revenue-facade", "auth_method") + cfg.config.requireString("nexus-httpd-revenue-facade", "auth_token") + } } // Config is sane. Go (maybe) making the private keys. val privsMaybe = preparePrivateKeys(cfg.clientPrivateKeysFilename) diff --git a/nexus/src/test/kotlin/pain001.xml b/nexus/src/test/kotlin/pain001.xml @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 pain.001.001.09.ch.03.xsd"> - <CstmrCdtTrfInitn> - <GrpHdr> - <MsgId>random</MsgId> - <CreDtTm>2023-10-26T12:54:13.423443377Z</CreDtTm> - <NbOfTxs>1</NbOfTxs> - <CtrlSum>TalerAmount(value=4, fraction=0, currency=CHF)</CtrlSum> - <InitgPty> - <Nm>Marcello Stanisci</Nm> - </InitgPty> - </GrpHdr> - <PmtInf> - <PmtInfId>NOT GIVEN</PmtInfId> - <PmtMtd>TRF</PmtMtd> - <BtchBookg>true</BtchBookg> - <NbOfTxs>1</NbOfTxs> - <CtrlSum>TalerAmount(value=4, fraction=0, currency=CHF)</CtrlSum> - <PmtTpInf> - <SvcLvl> - <Cd>SDVA</Cd> - </SvcLvl> - </PmtTpInf> - <ReqdExctnDt>2023-10-26Z</ReqdExctnDt> - <Dbtr> - <Nm>Marcello Stanisci</Nm> - </Dbtr> - <DbtrAcct> - <Id> - <IBAN>not-used-yet</IBAN> - </Id> - </DbtrAcct> - <DbtrAgt> - <FinInstnId> - <BICFI>POFICHBE</BICFI> - </FinInstnId> - </DbtrAgt> - <ChrgBr>SLEV</ChrgBr> - <CdtTrfTxInf> - <PmtId> - <InstrId>NOT PROVIDED</InstrId> - <EndToEndId>NOT PROVIDED</EndToEndId> - </PmtId> - <Amt> - <InstdAmt Ccy="CHF">4</InstdAmt> - </Amt> - <CdtrAgt> - <FinInstnId> - <BICFI>BIC</BICFI> - </FinInstnId> - </CdtrAgt> - <CdtrAcct> - <Id> - <IBAN>INVALID</IBAN> - </Id> - </CdtrAcct> - <RmtInf> - <Ustrd>Test reimbursement</Ustrd> - </RmtInf> - </CdtTrfTxInf> - </PmtInf> - </CstmrCdtTrfInitn> -</Document> -\ No newline at end of file