formatting code

This commit is contained in:
MS 2021-02-04 14:41:01 +01:00
parent 39723f6f97
commit c0904936e4
No known key found for this signature in database
GPG Key ID: 8D526861953F4C0F
2 changed files with 44 additions and 57 deletions

View File

@ -174,19 +174,17 @@ export class LibeufinNexusService {
await pingProc(this.nexusProc, url, "libeufin-nexus");
}
async createNexusSuperuser(
details: LibeufinNexusUser,
): Promise<void> {
async createNexusSuperuser(details: LibeufinNexusUser): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-nexus",
`libeufin-nexus superuser ${details.username} --password=${details.password}`,
extendEnv({ LIBEUFIN_NEXUS_DB_CONNECTION: this.nexusConfig.databaseJdbcUri }),
extendEnv({
LIBEUFIN_NEXUS_DB_CONNECTION: this.nexusConfig.databaseJdbcUri,
}),
);
console.log(stdout);
}
}
export interface CreateEbicsSubscriberRequest {
@ -262,7 +260,6 @@ export class LibeufinCli {
async createEbicsSubscriber(
details: LibeufinEbicsSubscriberDetails,
): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-createebicssubscriber",
@ -279,7 +276,6 @@ export class LibeufinCli {
sd: LibeufinEbicsSubscriberDetails,
bankAccountDetails: LibeufinBankAccountDetails,
): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-createebicsbankaccount",
@ -297,10 +293,7 @@ export class LibeufinCli {
console.log(stdout);
}
async generateTransactions(
accountName: string,
): Promise<void> {
async generateTransactions(accountName: string): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-generatetransactions",
@ -310,10 +303,7 @@ export class LibeufinCli {
console.log(stdout);
}
async showSandboxTransactions(
accountName: string,
): Promise<void> {
async showSandboxTransactions(accountName: string): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-showsandboxtransactions",
@ -326,7 +316,6 @@ export class LibeufinCli {
async createEbicsConnection(
connectionDetails: LibeufinEbicsConnectionDetails,
): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-createebicsconnection",
@ -345,10 +334,7 @@ export class LibeufinCli {
console.log(stdout);
}
async createBackupFile(
details: LibeufinBackupFileDetails,
): Promise<void> {
async createBackupFile(details: LibeufinBackupFileDetails): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-createbackupfile",
@ -365,10 +351,7 @@ export class LibeufinCli {
console.log(stdout);
}
async createKeyLetter(
details: LibeufinKeyLetterDetails,
): Promise<void> {
async createKeyLetter(details: LibeufinKeyLetterDetails): Promise<void> {
const stdout = await sh(
this.globalTestState,
"libeufin-cli-createkeyletter",

View File

@ -47,7 +47,7 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
databaseJdbcUri: `jdbc:sqlite:${t.testDir}/libeufin-nexus.sqlite3`,
});
const nexusUser = {username: "foo", password: "secret"};
const nexusUser = { username: "foo", password: "secret" };
const libeufinCli = new LibeufinCli(t, {
sandboxUrl: libeufinSandbox.baseUrl,
nexusUrl: libeufinNexus.baseUrl,
@ -57,13 +57,17 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
});
const ebicsDetails = {
hostId: "testhost", partnerId: "partner01", userId: "user01"
}
hostId: "testhost",
partnerId: "partner01",
userId: "user01",
};
const bankAccountDetails = {
currency: "EUR", iban: "DE18500105172929531888", bic: "INGDDEFFXXX",
personName: "Jane Normal", accountName: "testacct01"
}
currency: "EUR",
iban: "DE18500105172929531888",
bic: "INGDDEFFXXX",
personName: "Jane Normal",
accountName: "testacct01",
};
await libeufinCli.checkSandbox();
await libeufinCli.createEbicsHost("testhost");
@ -79,13 +83,13 @@ export async function runLibeufinTutorialTest(t: GlobalTestState) {
subscriberDetails: ebicsDetails,
ebicsUrl: `${libeufinSandbox.baseUrl}ebicsweb`, // FIXME: need appropriate URL concatenation
connectionName: "my-ebics-conn",
}
};
await libeufinCli.createEbicsConnection(connectionDetails);
await libeufinCli.createBackupFile({
passphrase: "secret",
outputFile: `${t.testDir}/connection-backup.json`,
connectionName: connectionDetails.connectionName,
})
});
await libeufinCli.createKeyLetter({
outputFile: `${t.testDir}/letter.pdf`,
connectionName: connectionDetails.connectionName,