[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/02: abstracting Libeufin users creation
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/02: abstracting Libeufin users creation |
Date: |
Fri, 12 Feb 2021 19:29:08 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository wallet-core.
commit 3197c862866f675b541d08bb6e2399c12de3f50b
Author: ms <ms@taler.net>
AuthorDate: Fri Feb 12 19:24:30 2021 +0100
abstracting Libeufin users creation
---
.../src/integrationtests/libeufin.ts | 64 ++++++++++++++++++++++
1 file changed, 64 insertions(+)
diff --git a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
index 021e0663..8d36c66a 100644
--- a/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/libeufin.ts
@@ -247,6 +247,70 @@ export interface SimulateIncomingTransactionRequest {
currency: string;
}
+
+/**
+ * The bundle aims at minimizing the amount of input
+ * data that is required to initialize a new user + Ebics
+ * connection thereof.
+ */
+class NexusUserBundle {
+ userReq: CreateNexusUserRequest;
+ connReq: CreateEbicsBankConnectionRequest;
+ twg: CreateTalerWireGatewayFacadeRequest;
+ localAccountName: string;
+ remoteAccountName: string;
+
+ constructor(ebicsURL: string, nameSalt: string) {
+
+ this.userReq = {
+ username: `username-${salt}`,
+ password: `password-${salt}`
+ };
+
+ this.connReq = {
+ name: `connection-${salt}`,
+ ebicsURL: ebicsURL,
+ hostID: `ebicshost-${salt}`,
+ partnerID: `ebicspartner-${salt}`,
+ userID: `ebicsuser-${salt}`,
+ };
+
+ this.twg = {
+ currency: "EUR",
+ name: `twg-${salt}`,
+ reserveTransferLevel: "report",
+ accountName: `local-account-${salt}`,
+ connectionName: `connection-${salt}`,
+ };
+ this.remoteAccountName = `remote-account-${salt}`;
+ this.localAccountName = `local-account-${salt}`;
+ }
+}
+
+/**
+ * The bundle aims at minimizing the amount of input
+ * data that is required to initialize a new Sandbox
+ * customer, associating their bank account with a Ebics
+ * subscriber.
+ */
+class SandboxUserBundle {
+ ebicsBankAccount: CreateEbicsBankAccountRequest;
+ constructor(salt: string) {
+ this.ebicsBankAccount = {
+ currency: "EUR",
+ bic: "DEUTDEBB101", // <= FIXME: properly randomize
+ iban: "IBAN", // <= FIXME: properly randomize
+ label: `remote-account-${salt}`,
+ name: `Taler Exchange: ${salt}`,
+ subscriber: {
+ hostID: `ebicshost-${salt}`,
+ partnerID: `ebicspartner-${salt}`,
+ userID: `ebicsuser-${salt}`,
+ },
+ }
+ }
+}
+
export class LibeufinCli {
cliDetails: LibeufinCliDetails;
globalTestState: GlobalTestState;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.