aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness')
-rw-r--r--packages/taler-harness/src/harness/helpers.ts14
-rw-r--r--packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts8
2 files changed, 14 insertions, 8 deletions
diff --git a/packages/taler-harness/src/harness/helpers.ts b/packages/taler-harness/src/harness/helpers.ts
index d194b0d36..2720be474 100644
--- a/packages/taler-harness/src/harness/helpers.ts
+++ b/packages/taler-harness/src/harness/helpers.ts
@@ -118,6 +118,8 @@ export interface EnvOptions {
skipWireFeeCreation?: boolean;
+ walletTestObservability?: boolean;
+
additionalExchangeConfig?(e: ExchangeService): void;
additionalMerchantConfig?(m: MerchantService): void;
additionalBankConfig?(b: BankService): void;
@@ -556,9 +558,12 @@ export async function createSimpleTestkudosEnvironmentV3(
),
});
- const { walletClient, walletService } = await createWalletDaemonWithClient(
- t,
- { name: "wallet", persistent: true },
+ const { walletClient, walletService } = await createWalletDaemonWithClient(t,
+ {
+ name: "wallet",
+ persistent: true,
+ emitObservabilityEvents: !!opts.walletTestObservability,
+ },
);
console.log("setup done!");
@@ -580,6 +585,7 @@ export interface CreateWalletArgs {
persistent?: boolean;
overrideDbPath?: string;
config?: PartialWalletRunConfig;
+ emitObservabilityEvents?: boolean;
}
export async function createWalletDaemonWithClient(
@@ -617,7 +623,7 @@ export async function createWalletDaemonWithClient(
const defaultRunConfig = {
testing: {
skipDefaults: true,
- emitObservabilityEvents: !!process.env["TALER_TEST_OBSERVABILITY"],
+ emitObservabilityEvents: !!process.env["TALER_TEST_OBSERVABILITY"] || !!args.emitObservabilityEvents,
},
} satisfies PartialWalletRunConfig;
await walletClient.client.call(WalletApiOperation.InitWallet, {
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts b/packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts
index 4506c47ff..d97737e25 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-network-availability.ts
@@ -34,12 +34,12 @@ import { TaskRunResultType } from "../../../taler-wallet-core/src/common.js";
*/
export async function runWalletNetworkAvailabilityTest(t: GlobalTestState) {
- // We need this to listen to the network-required observability event
- process.env['TALER_TEST_OBSERVABILITY'] = '1';
-
// Set up test environment
const { bankClient, walletClient, exchange } =
- await createSimpleTestkudosEnvironmentV3(t);
+ await createSimpleTestkudosEnvironmentV3(t, undefined, {
+ // We need this to listen to the network-required observability event
+ walletTestObservability: true,
+ });
await withdrawViaBankV3(t, {
walletClient,