diff options
author | Florian Dold <florian@dold.me> | 2021-03-17 17:56:37 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-03-17 17:56:37 +0100 |
commit | 07cdfb2e4ec761021477271776b81f33af0e731d (patch) | |
tree | cb62b1d1a04e1e64b8ee47e78196e858727d2c0a /packages/taler-wallet-cli/src/integrationtests/harness.ts | |
parent | 42a4d666f42ce94274995bfdae644444ff5f6d53 (diff) | |
download | wallet-core-07cdfb2e4ec761021477271776b81f33af0e731d.tar.xz |
towards wallet-core / util split
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/harness.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/harness.ts | 112 |
1 files changed, 57 insertions, 55 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts index 31f9131a3..65ffdafb5 100644 --- a/packages/taler-wallet-cli/src/integrationtests/harness.ts +++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts @@ -30,81 +30,83 @@ import * as path from "path"; import * as http from "http"; import { deepStrictEqual } from "assert"; import { ChildProcess, spawn } from "child_process"; +import { URL } from "url"; +import axios, { AxiosError } from "axios"; +import { + codecForMerchantOrderPrivateStatusResponse, + codecForPostOrderResponse, + PostOrderRequest, + PostOrderResponse, + MerchantOrderPrivateStatusResponse, + TippingReserveStatus, + TipCreateConfirmation, + TipCreateRequest, + MerchantInstancesResponse, +} from "./merchantApiTypes"; +import { + createEddsaKeyPair, + eddsaGetPublic, + EddsaKeyPair, + encodeCrock, + getRandomBytes, + openPromise, + OperationFailedError, +} from "@gnu-taler/taler-wallet-core"; import { - Configuration, AmountJson, Amounts, + Configuration, + AmountString, Codec, buildCodecForObject, codecForString, Duration, + parsePaytoUri, CoreApiResponse, - PreparePayResult, + ApplyRefundRequest, + ApplyRefundResponse, + codecForApplyRefundResponse, PreparePayRequest, + PreparePayResult, codecForPreparePayResult, - OperationFailedError, - AddExchangeRequest, - ExchangesListRespose, - codecForExchangesListResponse, - GetWithdrawalDetailsForUriRequest, - WithdrawUriInfoResponse, - codecForWithdrawUriInfoResponse, + CreateDepositGroupRequest, + CreateDepositGroupResponse, + AbortPayWithRefundRequest, ConfirmPayRequest, ConfirmPayResult, codecForConfirmPayResult, - IntegrationTestArgs, - TestPayArgs, + PrepareTipRequest, + PrepareTipResult, + codecForPrepareTipResult, + AcceptTipRequest, + CoinDumpJson, + codecForAny, + AddExchangeRequest, + ForceExchangeUpdateRequest, + ForceRefreshRequest, + ExchangesListRespose, + codecForExchangesListResponse, BalancesResponse, codecForBalancesResponse, - encodeCrock, - getRandomBytes, - EddsaKeyPair, - eddsaGetPublic, - createEddsaKeyPair, TransactionsResponse, codecForTransactionsResponse, - WithdrawTestBalanceRequest, - AmountString, - ApplyRefundRequest, - codecForApplyRefundResponse, - codecForAny, - CoinDumpJson, - ForceExchangeUpdateRequest, - ForceRefreshRequest, - PrepareTipResult, - PrepareTipRequest, - codecForPrepareTipResult, - AcceptTipRequest, - AbortPayWithRefundRequest, - openPromise, - parsePaytoUri, - CreateDepositGroupRequest, - CreateDepositGroupResponse, TrackDepositGroupRequest, TrackDepositGroupResponse, + IntegrationTestArgs, + TestPayArgs, + WithdrawTestBalanceRequest, + GetWithdrawalDetailsForUriRequest, + WithdrawUriInfoResponse, + codecForWithdrawUriInfoResponse, + BackupRecovery, RecoveryLoadRequest, -} from "@gnu-taler/taler-wallet-core"; -import { URL } from "url"; -import axios, { AxiosError } from "axios"; -import { - codecForMerchantOrderPrivateStatusResponse, - codecForPostOrderResponse, - PostOrderRequest, - PostOrderResponse, - MerchantOrderPrivateStatusResponse, - TippingReserveStatus, - TipCreateConfirmation, - TipCreateRequest, - MerchantInstancesResponse, -} from "./merchantApiTypes"; -import { ApplyRefundResponse } from "@gnu-taler/taler-wallet-core"; -import { PendingOperationsResponse } from "@gnu-taler/taler-wallet-core"; -import { CoinConfig } from "./denomStructures"; +} from "@gnu-taler/taler-util"; import { AddBackupProviderRequest, BackupInfo, - BackupRecovery, } from "@gnu-taler/taler-wallet-core/src/operations/backup"; +import { PendingOperationsResponse } from "@gnu-taler/taler-wallet-core/src/pending-types"; +import { CoinConfig } from "./denomStructures.js"; const exec = util.promisify(require("child_process").exec); @@ -486,7 +488,7 @@ export async function pingProc( } } -export interface ExchangeBankAccount { +export interface HarnessExchangeBankAccount { accountName: string; accountPassword: string; accountPaytoUri: string; @@ -573,7 +575,7 @@ export namespace BankApi { export async function adminAddIncoming( bank: BankServiceInterface, params: { - exchangeBankAccount: ExchangeBankAccount; + exchangeBankAccount: HarnessExchangeBankAccount; amount: string; reservePub: string; debitAccountPayto: string; @@ -701,7 +703,7 @@ export class BankService implements BankServiceInterface { async createExchangeAccount( accountName: string, password: string, - ): Promise<ExchangeBankAccount> { + ): Promise<HarnessExchangeBankAccount> { await sh( this.globalTestState, "taler-bank-manage_django", @@ -944,7 +946,7 @@ export class ExchangeService implements ExchangeServiceInterface { async addBankAccount( localName: string, - exchangeBankAccount: ExchangeBankAccount, + exchangeBankAccount: HarnessExchangeBankAccount, ): Promise<void> { const config = Configuration.load(this.configFilename); config.setString( |