wallet-cli: benchmarking

This commit is contained in:
Florian Dold 2021-10-20 13:06:31 +02:00
parent c3570484a8
commit 589c2a3382
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
74 changed files with 353 additions and 146 deletions

View File

@ -0,0 +1,89 @@
/*
This file is part of GNU Taler
(C) 2021 Taler Systems S.A.
GNU Taler is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* Imports.
*/
import { buildCodecForObject, codecForString } from "@gnu-taler/taler-util";
import {
getDefaultNodeWallet,
NodeHttpLib,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
/**
* Entry point for the benchmark.
*
* The benchmark runs against an existing Taler deployment and does not
* set up its own services.
*/
export async function runBench1(configJson: any): Promise<void> {
// Validate the configuration file for this benchmark.
const b1conf = codecForBench1Config().decode(configJson);
const myHttpLib = new NodeHttpLib();
const wallet = await getDefaultNodeWallet({
// No persistent DB storage.
persistentStoragePath: undefined,
httpLib: myHttpLib,
});
await wallet.client.call(WalletApiOperation.InitWallet, {});
await wallet.client.call(WalletApiOperation.WithdrawFakebank, {
amount: "TESTKUDOS:10",
bank: b1conf.bank,
exchange: b1conf.exchange,
});
await wallet.runTaskLoop({
stopWhenDone: true,
});
await wallet.client.call(WalletApiOperation.CreateDepositGroup, {
amount: "TESTKUDOS:5",
depositPaytoUri: "payto://x-taler-bank/localhost/foo",
});
await wallet.runTaskLoop({
stopWhenDone: true,
});
wallet.stop();
}
/**
* Format of the configuration file passed to the benchmark
*/
interface Bench1Config {
/**
* Base URL of the bank.
*/
bank: string;
/**
* Base URL of the exchange.
*/
exchange: string;
}
/**
* Schema validation codec for Bench1Config.
*/
const codecForBench1Config = () =>
buildCodecForObject<Bench1Config>()
.property("bank", codecForString())
.property("exchange", codecForString())
.build("Bench1Config");

View File

@ -0,0 +1,68 @@
/*
This file is part of GNU Taler
(C) 2021 Taler Systems S.A.
GNU Taler is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
/**
* Imports.
*/
import { URL } from "@gnu-taler/taler-util";
import { CoinConfig, defaultCoinConfig } from "./harness/denomStructures.js";
import {
GlobalTestState,
setupDb,
FakeBankService,
ExchangeService,
} from "./harness/harness.js";
/**
* Entry point for the benchmark.
*
* The benchmark runs against an existing Taler deployment and does not
* set up its own services.
*/
export async function runEnv1(t: GlobalTestState): Promise<void> {
const db = await setupDb(t);
const bank = await FakeBankService.create(t, {
currency: "TESTKUDOS",
httpPort: 8082,
});
const exchange = ExchangeService.create(t, {
name: "testexchange-1",
currency: "TESTKUDOS",
httpPort: 8081,
database: db.connStr,
});
exchange.addBankAccount("1", {
accountName: "exchange",
accountPassword: "x",
wireGatewayApiBaseUrl: new URL("/exchange/", bank.baseUrl).href,
accountPaytoUri: "payto://x-taler-bank/localhost/exchange",
});
await bank.start();
await bank.pingUntilAvailable();
const coinConfig: CoinConfig[] = defaultCoinConfig.map((x) => x("TESTKUDOS"));
exchange.addCoinConfigList(coinConfig);
await exchange.start();
await exchange.pingUntilAvailable();
console.log("setup done!");
}

View File

@ -31,7 +31,7 @@ import {
ExchangeServiceInterface, ExchangeServiceInterface,
MerchantServiceInterface, MerchantServiceInterface,
MerchantService, MerchantService,
} from "./harness"; } from "../harness/harness.js";
export interface FaultProxyConfig { export interface FaultProxyConfig {
inboundPort: number; inboundPort: number;

View File

@ -28,6 +28,7 @@ import * as util from "util";
import * as fs from "fs"; import * as fs from "fs";
import * as path from "path"; import * as path from "path";
import * as http from "http"; import * as http from "http";
import * as readline from "readline";
import { deepStrictEqual } from "assert"; import { deepStrictEqual } from "assert";
import { ChildProcess, spawn } from "child_process"; import { ChildProcess, spawn } from "child_process";
import { URL } from "url"; import { URL } from "url";
@ -1626,6 +1627,7 @@ export async function runTestWithState(
gc: GlobalTestState, gc: GlobalTestState,
testMain: (t: GlobalTestState) => Promise<void>, testMain: (t: GlobalTestState) => Promise<void>,
testName: string, testName: string,
linger: boolean = false,
): Promise<TestRunResult> { ): Promise<TestRunResult> {
const startMs = new Date().getTime(); const startMs = new Date().getTime();
@ -1649,6 +1651,19 @@ export async function runTestWithState(
console.log("running test in directory", gc.testDir); console.log("running test in directory", gc.testDir);
await Promise.race([testMain(gc), p.promise]); await Promise.race([testMain(gc), p.promise]);
status = "pass"; status = "pass";
if (linger) {
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: true,
});
await new Promise<void>((resolve, reject) => {
rl.question("Press enter to shut down test.", () => {
resolve();
});
});
rl.close();
}
} catch (e) { } catch (e) {
console.error("FATAL: test failed with exception", e); console.error("FATAL: test failed with exception", e);
status = "fail"; status = "fail";

View File

@ -19,7 +19,7 @@
*/ */
import axios from "axios"; import axios from "axios";
import { URL } from "@gnu-taler/taler-util"; import { URL } from "@gnu-taler/taler-util";
import { getRandomIban, getRandomString } from "./helpers"; import { getRandomIban, getRandomString } from "../harness/helpers.js";
import { import {
GlobalTestState, GlobalTestState,
DbInfo, DbInfo,
@ -28,7 +28,7 @@ import {
runCommand, runCommand,
setupDb, setupDb,
sh, sh,
} from "./harness"; } from "../harness/harness.js";
export interface LibeufinSandboxServiceInterface { export interface LibeufinSandboxServiceInterface {
baseUrl: string; baseUrl: string;

View File

@ -24,7 +24,7 @@ import {
GlobalTestState, GlobalTestState,
pingProc, pingProc,
ProcessWrapper, ProcessWrapper,
} from "./harness"; } from "../harness/harness.js";
import { Configuration } from "@gnu-taler/taler-util"; import { Configuration } from "@gnu-taler/taler-util";
const exec = util.promisify(require("child_process").exec); const exec = util.promisify(require("child_process").exec);

View File

@ -19,6 +19,7 @@
*/ */
import os from "os"; import os from "os";
import fs from "fs"; import fs from "fs";
import path from "path";
import { deepStrictEqual } from "assert"; import { deepStrictEqual } from "assert";
// Polyfill for encoding which isn't present globally in older nodejs versions // Polyfill for encoding which isn't present globally in older nodejs versions
import { TextEncoder, TextDecoder } from "util"; import { TextEncoder, TextDecoder } from "util";
@ -56,6 +57,9 @@ import {
Wallet, Wallet,
} from "@gnu-taler/taler-wallet-core"; } from "@gnu-taler/taler-wallet-core";
import { lintExchangeDeployment } from "./lint.js"; import { lintExchangeDeployment } from "./lint.js";
import { runBench1 } from "./bench1.js";
import { runEnv1 } from "./env1.js";
import { GlobalTestState, runTestWithState } from "./harness/harness.js";
// This module also serves as the entry point for the crypto // This module also serves as the entry point for the crypto
// thread worker, and thus must expose these two handlers. // thread worker, and thus must expose these two handlers.
@ -634,6 +638,33 @@ const advancedCli = walletCli.subcommand("advancedArgs", "advanced", {
"Subcommands for advanced operations (only use if you know what you're doing!).", "Subcommands for advanced operations (only use if you know what you're doing!).",
}); });
advancedCli
.subcommand("bench1", "bench1", {
help: "Run the 'bench1' benchmark",
})
.requiredOption("configJson", ["--config-json"], clk.STRING)
.action(async (args) => {
let config: any;
try {
config = JSON.parse(args.bench1.configJson);
} catch (e) {
console.log("Could not parse config JSON");
}
await runBench1(config);
});
advancedCli
.subcommand("env1", "env1", {
help: "Run a test environment for bench1",
})
.action(async (args) => {
const testDir = fs.mkdtempSync(path.join(os.tmpdir(), "taler-env1-"));
const testState = new GlobalTestState({
testDir,
});
await runTestWithState(testState, runEnv1, "env1", true);
});
advancedCli advancedCli
.subcommand("withdrawFakebank", "withdraw-fakebank", { .subcommand("withdrawFakebank", "withdraw-fakebank", {
help: "Withdraw via a fakebank.", help: "Withdraw via a fakebank.",
@ -642,7 +673,7 @@ advancedCli
help: "Base URL of the exchange to use", help: "Base URL of the exchange to use",
}) })
.requiredOption("amount", ["--amount"], clk.STRING, { .requiredOption("amount", ["--amount"], clk.STRING, {
help: "Amount to withdraw (before fees)." help: "Amount to withdraw (before fees).",
}) })
.requiredOption("bank", ["--bank"], clk.STRING, { .requiredOption("bank", ["--bank"], clk.STRING, {
help: "Base URL of the Taler fakebank service.", help: "Base URL of the Taler fakebank service.",

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -27,9 +27,9 @@ import {
BankApi, BankApi,
BankAccessApi, BankAccessApi,
CreditDebitIndicator, CreditDebitIndicator,
} from "./harness"; } from "../harness/harness.js";
import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util"; import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util";
import { defaultCoinConfig } from "./denomStructures"; import { defaultCoinConfig } from "../harness/denomStructures";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { URL } from "url"; import { URL } from "url";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";

View File

@ -27,8 +27,8 @@ import {
WalletApiOperation, WalletApiOperation,
} from "@gnu-taler/taler-wallet-core"; } from "@gnu-taler/taler-wallet-core";
import { makeEventId } from "@gnu-taler/taler-wallet-core"; import { makeEventId } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
export async function runDenomUnofferedTest(t: GlobalTestState) { export async function runDenomUnofferedTest(t: GlobalTestState) {
// Set up test environment // Set up test environment

View File

@ -18,8 +18,8 @@
* Imports. * Imports.
*/ */
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal and payment. * Run test for basic, bank-integrated withdrawal and payment.

View File

@ -26,7 +26,7 @@ import {
MerchantService, MerchantService,
BankApi, BankApi,
BankAccessApi, BankAccessApi,
} from "./harness"; } from "../harness/harness.js";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { import {
ExchangesListRespose, ExchangesListRespose,
@ -36,8 +36,8 @@ import {
import { import {
FaultInjectedExchangeService, FaultInjectedExchangeService,
FaultInjectionResponseContext, FaultInjectionResponseContext,
} from "./faultInjection"; } from "../harness/faultInjection";
import { defaultCoinConfig } from "./denomStructures"; import { defaultCoinConfig } from "../harness/denomStructures";
/** /**
* Test if the wallet handles outdated exchange versions correct.y * Test if the wallet handles outdated exchange versions correct.y

View File

@ -31,7 +31,7 @@ import {
readSuccessResponseJsonOrThrow, readSuccessResponseJsonOrThrow,
WalletApiOperation, WalletApiOperation,
} from "@gnu-taler/taler-wallet-core"; } from "@gnu-taler/taler-wallet-core";
import { makeNoFeeCoinConfig } from "./denomStructures"; import { makeNoFeeCoinConfig } from "../harness/denomStructures";
import { import {
BankService, BankService,
ExchangeService, ExchangeService,
@ -40,8 +40,8 @@ import {
MerchantService, MerchantService,
setupDb, setupDb,
WalletCli, WalletCli,
} from "./harness"; } from "../harness/harness.js";
import { startWithdrawViaBank, withdrawViaBank } from "./helpers"; import { startWithdrawViaBank, withdrawViaBank } from "../harness/helpers.js";
async function applyTimeTravel( async function applyTimeTravel(
timetravelDuration: Duration, timetravelDuration: Duration,

View File

@ -25,12 +25,12 @@ import {
MerchantService, MerchantService,
setupDb, setupDb,
WalletCli, WalletCli,
} from "./harness"; } from "../harness/harness.js";
import { import {
withdrawViaBank, withdrawViaBank,
makeTestPayment, makeTestPayment,
SimpleTestEnvironment, SimpleTestEnvironment,
} from "./helpers"; } from "../harness/helpers.js";
/** /**
* Run a test case with a simple TESTKUDOS Taler environment, consisting * Run a test case with a simple TESTKUDOS Taler environment, consisting

View File

@ -17,7 +17,7 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
@ -25,7 +25,7 @@ import {
LibeufinSandboxService, LibeufinSandboxService,
LibeufinSandboxApi, LibeufinSandboxApi,
findNexusPayment, findNexusPayment,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -17,7 +17,7 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
@ -25,7 +25,7 @@ import {
LibeufinSandboxService, LibeufinSandboxService,
LibeufinSandboxApi, LibeufinSandboxApi,
findNexusPayment, findNexusPayment,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -19,13 +19,13 @@
*/ */
import axios from "axios"; import axios from "axios";
import { URL } from "@gnu-taler/taler-util"; import { URL } from "@gnu-taler/taler-util";
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
export async function runLibeufinApiFacadeBadRequestTest(t: GlobalTestState) { export async function runLibeufinApiFacadeBadRequestTest(t: GlobalTestState) {

View File

@ -17,13 +17,13 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -17,12 +17,12 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
LibeufinNexusService, LibeufinNexusService,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -17,7 +17,7 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
@ -25,7 +25,7 @@ import {
LibeufinSandboxService, LibeufinSandboxService,
LibeufinSandboxApi, LibeufinSandboxApi,
findNexusPayment, findNexusPayment,
} from "./libeufin"; } from "../harness/libeufin";
// This test only checks that LibEuFin doesn't fail when // This test only checks that LibEuFin doesn't fail when
// it generates Camt statements - no assertions take place. // it generates Camt statements - no assertions take place.

View File

@ -17,7 +17,7 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
@ -25,7 +25,7 @@ import {
LibeufinSandboxService, LibeufinSandboxService,
LibeufinSandboxApi, LibeufinSandboxApi,
findNexusPayment, findNexusPayment,
} from "./libeufin"; } from "../harness/libeufin";
export async function runLibeufinApiSandboxTransactionsTest(t: GlobalTestState) { export async function runLibeufinApiSandboxTransactionsTest(t: GlobalTestState) {

View File

@ -17,7 +17,7 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, setupDb } from "./harness"; import { GlobalTestState, setupDb } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
@ -25,7 +25,7 @@ import {
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinNexusApi, LibeufinNexusApi,
LibeufinNexusService, LibeufinNexusService,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Test Nexus scheduling API. It creates a task, check whether it shows * Test Nexus scheduling API. It creates a task, check whether it shows
@ -72,7 +72,7 @@ export async function runLibeufinApiSchedulingTest(t: GlobalTestState) {
user01nexus.localAccountName, user01nexus.localAccountName,
"test-task", "test-task",
); );
} catch (err) { } catch (err: any) {
t.assertTrue(err.response.status == 404); t.assertTrue(err.response.status == 404);
} }
@ -100,7 +100,7 @@ export async function runLibeufinApiSchedulingTest(t: GlobalTestState) {
user01nexus.localAccountName, user01nexus.localAccountName,
"test-task", "test-task",
); );
} catch (err) { } catch (err: any) {
t.assertTrue(err.response.status == 404); t.assertTrue(err.response.status == 404);
} }
} }

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { LibeufinNexusApi, LibeufinNexusService } from "./libeufin"; import { LibeufinNexusApi, LibeufinNexusService } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -17,13 +17,13 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, delayMs } from "./harness"; import { GlobalTestState, delayMs } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
LibeufinNexusService, LibeufinNexusService,
LibeufinSandboxService, LibeufinSandboxService,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Testing how Nexus reacts when the Sandbox is unreachable. * Testing how Nexus reacts when the Sandbox is unreachable.
@ -65,7 +65,7 @@ export async function runLibeufinBadGatewayTest(t: GlobalTestState) {
libeufinNexus, libeufinNexus,
user01nexus.connReq.name, user01nexus.connReq.name,
); );
} catch(e) { } catch(e: any) {
t.assertTrue(e.response.status == 502); t.assertTrue(e.response.status == 502);
return; return;
} }

View File

@ -19,7 +19,7 @@
*/ */
import { CoreApiResponse } from "@gnu-taler/taler-util"; import { CoreApiResponse } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig, defaultCoinConfig } from "./denomStructures"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures";
import { import {
DbInfo, DbInfo,
HarnessExchangeBankAccount, HarnessExchangeBankAccount,
@ -28,14 +28,14 @@ import {
MerchantService, MerchantService,
setupDb, setupDb,
WalletCli, WalletCli,
} from "./harness"; } from "../harness/harness.js";
import { makeTestPayment } from "./helpers"; import { makeTestPayment } from "../harness/helpers.js";
import { import {
LibeufinNexusApi, LibeufinNexusApi,
LibeufinNexusService, LibeufinNexusService,
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinSandboxService, LibeufinSandboxService,
} from "./libeufin"; } from "../harness/libeufin";
const exchangeIban = "DE71500105179674997361"; const exchangeIban = "DE71500105179674997361";
const customerIban = "DE84500105176881385584"; const customerIban = "DE84500105176881385584";

View File

@ -17,14 +17,14 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, delayMs } from "./harness"; import { GlobalTestState, delayMs } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* This test checks how the C52 and C53 coordinate. It'll test * This test checks how the C52 and C53 coordinate. It'll test

View File

@ -17,14 +17,14 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinNexusApi, LibeufinNexusApi,
LibeufinSandboxApi, LibeufinSandboxApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Testing the Anastasis API, offered by the Anastasis facade. * Testing the Anastasis API, offered by the Anastasis facade.

View File

@ -17,14 +17,14 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -17,14 +17,14 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, delayMs } from "./harness"; import { GlobalTestState, delayMs } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* This test checks how the C52 and C53 coordinate. It'll test * This test checks how the C52 and C53 coordinate. It'll test

View File

@ -17,14 +17,14 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, delayMs } from "./harness"; import { GlobalTestState, delayMs } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* User 01 expects a refund from user 02, and expectedly user 03 * User 01 expects a refund from user 02, and expectedly user 03

View File

@ -17,14 +17,14 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, delayMs } from "./harness"; import { GlobalTestState, delayMs } from "../harness/harness.js";
import { import {
SandboxUserBundle, SandboxUserBundle,
NexusUserBundle, NexusUserBundle,
launchLibeufinServices, launchLibeufinServices,
LibeufinSandboxApi, LibeufinSandboxApi,
LibeufinNexusApi, LibeufinNexusApi,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -17,7 +17,7 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
NexusUserBundle, NexusUserBundle,
LibeufinNexusApi, LibeufinNexusApi,
@ -25,7 +25,7 @@ import {
LibeufinSandboxService, LibeufinSandboxService,
LibeufinSandboxApi, LibeufinSandboxApi,
findNexusPayment, findNexusPayment,
} from "./libeufin"; } from "../harness/libeufin";
export async function runLibeufinSandboxWireTransferCliTest(t: GlobalTestState) { export async function runLibeufinSandboxWireTransferCliTest(t: GlobalTestState) {

View File

@ -17,12 +17,12 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
LibeufinNexusService, LibeufinNexusService,
LibeufinSandboxService, LibeufinSandboxService,
LibeufinCli, LibeufinCli,
} from "./libeufin"; } from "../harness/libeufin";
/** /**
* Run basic test with LibEuFin. * Run basic test with LibEuFin.

View File

@ -25,12 +25,12 @@ import {
MerchantService, MerchantService,
setupDb, setupDb,
WalletCli, WalletCli,
} from "./harness"; } from "../harness/harness.js";
import { import {
withdrawViaBank, withdrawViaBank,
createFaultInjectedMerchantTestkudosEnvironment, createFaultInjectedMerchantTestkudosEnvironment,
FaultyMerchantTestEnvironment, FaultyMerchantTestEnvironment,
} from "./helpers"; } from "../harness/helpers.js";
import { import {
PreparePayResultType, PreparePayResultType,
codecForMerchantOrderStatusUnpaid, codecForMerchantOrderStatusUnpaid,
@ -41,8 +41,8 @@ import {
FaultInjectedExchangeService, FaultInjectedExchangeService,
FaultInjectedMerchantService, FaultInjectedMerchantService,
FaultInjectionRequestContext, FaultInjectionRequestContext,
} from "./faultInjection"; } from "../harness/faultInjection";
import { defaultCoinConfig } from "./denomStructures"; import { defaultCoinConfig } from "../harness/denomStructures";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { URL } from "url"; import { URL } from "url";

View File

@ -25,7 +25,7 @@ import {
MerchantApiClient, MerchantApiClient,
MerchantService, MerchantService,
setupDb, setupDb,
} from "./harness"; } from "../harness/harness.js";
/** /**
* Test instance deletion and authentication for it * Test instance deletion and authentication for it

View File

@ -24,7 +24,7 @@ import {
MerchantApiClient, MerchantApiClient,
MerchantService, MerchantService,
setupDb, setupDb,
} from "./harness"; } from "../harness/harness.js";
/** /**
* Do basic checks on instance management and authentication. * Do basic checks on instance management and authentication.

View File

@ -25,7 +25,7 @@ import {
MerchantApiClient, MerchantApiClient,
MerchantService, MerchantService,
setupDb, setupDb,
} from "./harness"; } from "../harness/harness.js";
/** /**
* Do basic checks on instance management and authentication. * Do basic checks on instance management and authentication.

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { import {
PreparePayResultType, PreparePayResultType,
codecForMerchantOrderStatusUnpaid, codecForMerchantOrderStatusUnpaid,

View File

@ -24,8 +24,8 @@ import {
MerchantServiceInterface, MerchantServiceInterface,
WalletCli, WalletCli,
ExchangeServiceInterface, ExchangeServiceInterface,
} from "./harness"; } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { import {
URL, URL,
durationFromSpec, durationFromSpec,

View File

@ -32,11 +32,11 @@ import {
MerchantPrivateApi, MerchantPrivateApi,
MerchantService, MerchantService,
WalletCli, WalletCli,
} from "./harness"; } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
} from "./helpers.js"; } from "../harness/helpers.js";
const httpLib = new NodeHttpLib(); const httpLib = new NodeHttpLib();

View File

@ -27,12 +27,12 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { import {
FaultInjectionRequestContext, FaultInjectionRequestContext,
FaultInjectionResponseContext, FaultInjectionResponseContext,
} from "./faultInjection"; } from "../harness/faultInjection";
import { GlobalTestState, MerchantPrivateApi, setupDb } from "./harness"; import { GlobalTestState, MerchantPrivateApi, setupDb } from "../harness/harness.js";
import { import {
createFaultInjectedMerchantTestkudosEnvironment, createFaultInjectedMerchantTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
} from "./helpers"; } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -17,11 +17,11 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { import {
withdrawViaBank, withdrawViaBank,
createFaultInjectedMerchantTestkudosEnvironment, createFaultInjectedMerchantTestkudosEnvironment,
} from "./helpers"; } from "../harness/helpers.js";
import { import {
PreparePayResultType, PreparePayResultType,
codecForMerchantOrderStatusUnpaid, codecForMerchantOrderStatusUnpaid,
@ -29,7 +29,7 @@ import {
URL, URL,
} from "@gnu-taler/taler-util"; } from "@gnu-taler/taler-util";
import axios from "axios"; import axios from "axios";
import { FaultInjectionRequestContext } from "./faultInjection"; import { FaultInjectionRequestContext } from "../harness/faultInjection";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/** /**

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi, WalletCli } from "./harness"; import { GlobalTestState, MerchantPrivateApi, WalletCli } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { PreparePayResultType } from "@gnu-taler/taler-util"; import { PreparePayResultType } from "@gnu-taler/taler-util";
import { TalerErrorCode } from "@gnu-taler/taler-util"; import { TalerErrorCode } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";

View File

@ -31,14 +31,14 @@ import {
MerchantPrivateApi, MerchantPrivateApi,
BankApi, BankApi,
BankAccessApi, BankAccessApi,
} from "./harness"; } from "../harness/harness.js";
import { import {
FaultInjectedExchangeService, FaultInjectedExchangeService,
FaultInjectionRequestContext, FaultInjectionRequestContext,
FaultInjectionResponseContext, FaultInjectionResponseContext,
} from "./faultInjection"; } from "../harness/faultInjection";
import { CoreApiResponse } from "@gnu-taler/taler-util"; import { CoreApiResponse } from "@gnu-taler/taler-util";
import { defaultCoinConfig } from "./denomStructures"; import { defaultCoinConfig } from "../harness/denomStructures";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/** /**

View File

@ -17,12 +17,12 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
makeTestPayment, makeTestPayment,
} from "./helpers"; } from "../harness/helpers.js";
/** /**
* Run test for payment with a contract that has forgettable fields. * Run test for payment with a contract that has forgettable fields.

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { PreparePayResultType } from "@gnu-taler/taler-util"; import { PreparePayResultType } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";

View File

@ -25,9 +25,9 @@ import {
MerchantService, MerchantService,
WalletCli, WalletCli,
MerchantPrivateApi, MerchantPrivateApi,
} from "./harness"; } from "../harness/harness.js";
import { withdrawViaBank } from "./helpers"; import { withdrawViaBank } from "../harness/helpers.js";
import { coin_ct10, coin_u1 } from "./denomStructures"; import { coin_ct10, coin_u1 } from "../harness/denomStructures";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
async function setupTest( async function setupTest(

View File

@ -22,10 +22,10 @@ import {
BankApi, BankApi,
WalletCli, WalletCli,
BankAccessApi BankAccessApi
} from "./harness"; } from "../harness/harness.js";
import { import {
makeTestPayment, makeTestPayment,
} from "./helpers"; } from "../harness/helpers.js";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/** /**

View File

@ -17,16 +17,16 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { import {
withdrawViaBank, withdrawViaBank,
createFaultInjectedMerchantTestkudosEnvironment, createFaultInjectedMerchantTestkudosEnvironment,
} from "./helpers"; } from "../harness/helpers.js";
import axios from "axios"; import axios from "axios";
import { import {
FaultInjectionRequestContext, FaultInjectionRequestContext,
FaultInjectionResponseContext, FaultInjectionResponseContext,
} from "./faultInjection"; } from "../harness/faultInjection";
import { import {
codecForMerchantOrderStatusUnpaid, codecForMerchantOrderStatusUnpaid,
ConfirmPayResultType, ConfirmPayResultType,

View File

@ -18,12 +18,12 @@
* Imports. * Imports.
*/ */
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
makeTestPayment, makeTestPayment,
} from "./helpers"; } from "../harness/helpers.js";
/** /**
* Run test for a payment for a "free" order with * Run test for a payment for a "free" order with

View File

@ -17,12 +17,12 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
makeTestPayment, makeTestPayment,
} from "./helpers"; } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal and payment. * Run test for basic, bank-integrated withdrawal and payment.

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { import {
PreparePayResultType, PreparePayResultType,
codecForMerchantOrderStatusUnpaid, codecForMerchantOrderStatusUnpaid,

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { durationFromSpec } from "@gnu-taler/taler-util"; import { durationFromSpec } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";

View File

@ -17,12 +17,12 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
applyTimeTravel, applyTimeTravel,
} from "./helpers"; } from "../harness/helpers.js";
import { import {
durationFromSpec, durationFromSpec,
timestampAddDuration, timestampAddDuration,

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, delayMs, MerchantPrivateApi } from "./harness"; import { GlobalTestState, delayMs, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { import {
TransactionType, TransactionType,
Amounts, Amounts,

View File

@ -19,8 +19,8 @@
*/ */
import { durationFromSpec } from "@gnu-taler/taler-util"; import { durationFromSpec } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, MerchantPrivateApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -18,7 +18,7 @@
* Imports. * Imports.
*/ */
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig } from "./denomStructures"; import { CoinConfig } from "../harness/denomStructures";
import { import {
GlobalTestState, GlobalTestState,
ExchangeService, ExchangeService,
@ -27,12 +27,12 @@ import {
setupDb, setupDb,
BankService, BankService,
delayMs, delayMs,
} from "./harness"; } from "../harness/harness.js";
import { import {
withdrawViaBank, withdrawViaBank,
makeTestPayment, makeTestPayment,
SimpleTestEnvironment, SimpleTestEnvironment,
} from "./helpers"; } from "../harness/helpers.js";
async function revokeAllWalletCoins(req: { async function revokeAllWalletCoins(req: {
wallet: WalletCli; wallet: WalletCli;

View File

@ -27,7 +27,7 @@ import {
PendingOperationsResponse, PendingOperationsResponse,
WalletApiOperation, WalletApiOperation,
} from "@gnu-taler/taler-wallet-core"; } from "@gnu-taler/taler-wallet-core";
import { makeNoFeeCoinConfig } from "./denomStructures"; import { makeNoFeeCoinConfig } from "../harness/denomStructures";
import { import {
BankService, BankService,
ExchangeService, ExchangeService,
@ -36,8 +36,8 @@ import {
MerchantService, MerchantService,
setupDb, setupDb,
WalletCli, WalletCli,
} from "./harness"; } from "../harness/harness.js";
import { startWithdrawViaBank, withdrawViaBank } from "./helpers"; import { startWithdrawViaBank, withdrawViaBank } from "../harness/helpers.js";
async function applyTimeTravel( async function applyTimeTravel(
timetravelDuration: Duration, timetravelDuration: Duration,

View File

@ -17,12 +17,12 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState } from "./harness"; import { GlobalTestState } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
withdrawViaBank, withdrawViaBank,
startWithdrawViaBank, startWithdrawViaBank,
} from "./helpers"; } from "../harness/helpers.js";
import { Duration, TransactionType } from "@gnu-taler/taler-util"; import { Duration, TransactionType } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";

View File

@ -18,8 +18,8 @@
* Imports. * Imports.
*/ */
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, MerchantPrivateApi, BankApi } from "./harness"; import { GlobalTestState, MerchantPrivateApi, BankApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment } from "./helpers"; import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -18,9 +18,9 @@
* Imports. * Imports.
*/ */
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, WalletCli } from "./harness"; import { GlobalTestState, WalletCli } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment, withdrawViaBank } from "./helpers"; import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js";
import { SyncService } from "./sync"; import { SyncService } from "../harness/sync";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -19,13 +19,13 @@
*/ */
import { PreparePayResultType } from "@gnu-taler/taler-util"; import { PreparePayResultType } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, WalletCli, MerchantPrivateApi } from "./harness"; import { GlobalTestState, WalletCli, MerchantPrivateApi } from "../harness/harness.js";
import { import {
createSimpleTestkudosEnvironment, createSimpleTestkudosEnvironment,
makeTestPayment, makeTestPayment,
withdrawViaBank, withdrawViaBank,
} from "./helpers"; } from "../harness/helpers.js";
import { SyncService } from "./sync"; import { SyncService } from "../harness/sync";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -24,7 +24,7 @@
*/ */
import { Amounts } from "@gnu-taler/taler-util"; import { Amounts } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig, defaultCoinConfig } from "./denomStructures.js"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
import { import {
BankService, BankService,
ExchangeService, ExchangeService,
@ -32,8 +32,8 @@ import {
MerchantService, MerchantService,
setupDb, setupDb,
WalletCli, WalletCli,
} from "./harness.js"; } from "../harness/harness.js";
import { SimpleTestEnvironment } from "./helpers.js"; import { SimpleTestEnvironment } from "../harness/helpers.js";
const merchantAuthToken = "secret-token:sandbox"; const merchantAuthToken = "secret-token:sandbox";

View File

@ -19,8 +19,8 @@
*/ */
import { TalerErrorCode } from "@gnu-taler/taler-util"; import { TalerErrorCode } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState, BankApi, BankAccessApi } from "./harness"; import { GlobalTestState, BankApi, BankAccessApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment } from "./helpers"; import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
/** /**
* Run test for basic, bank-integrated withdrawal. * Run test for basic, bank-integrated withdrawal.

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, BankApi, BankAccessApi } from "./harness"; import { GlobalTestState, BankApi, BankAccessApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment } from "./helpers"; import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
import { codecForBalancesResponse } from "@gnu-taler/taler-util"; import { codecForBalancesResponse } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";

View File

@ -24,10 +24,10 @@ import {
setupDb, setupDb,
ExchangeService, ExchangeService,
FakeBankService, FakeBankService,
} from "./harness"; } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment } from "./helpers"; import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig, defaultCoinConfig } from "./denomStructures.js"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
import { URL } from "@gnu-taler/taler-util"; import { URL } from "@gnu-taler/taler-util";
/** /**

View File

@ -17,8 +17,8 @@
/** /**
* Imports. * Imports.
*/ */
import { GlobalTestState, BankApi } from "./harness"; import { GlobalTestState, BankApi } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment } from "./helpers"; import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/** /**

View File

@ -22,7 +22,7 @@ import {
runTestWithState, runTestWithState,
shouldLingerInTest, shouldLingerInTest,
TestRunResult, TestRunResult,
} from "./harness"; } from "../harness/harness.js";
import { runPaymentTest } from "./test-payment"; import { runPaymentTest } from "./test-payment";
import { runPaymentDemoTest } from "./test-payment-on-demo"; import { runPaymentDemoTest } from "./test-payment-on-demo";
import * as fs from "fs"; import * as fs from "fs";

View File

@ -43,7 +43,7 @@ import {
} from "@gnu-taler/taler-wallet-core"; } from "@gnu-taler/taler-wallet-core";
import { URL } from "url"; import { URL } from "url";
import { spawn } from "child_process"; import { spawn } from "child_process";
import { delayMs } from "./integrationtests/harness.js"; import { delayMs } from "./harness/harness.js";
interface BasicConf { interface BasicConf {
mainCurrency: string; mainCurrency: string;

View File

@ -118,6 +118,10 @@ export enum WalletApiOperation {
} }
export type WalletOperations = { export type WalletOperations = {
[WalletApiOperation.InitWallet]: {
request: {};
response: {};
};
[WalletApiOperation.WithdrawFakebank]: { [WalletApiOperation.WithdrawFakebank]: {
request: WithdrawFakebankRequest; request: WithdrawFakebankRequest;
response: {}; response: {};