diff options
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests')
3 files changed, 32 insertions, 6 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts b/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts index 3d160ca08..af5b4df52 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions-peer.ts @@ -17,6 +17,7 @@ /** * Imports. */ +import { AbsoluteTime, Duration } from "@gnu-taler/taler-util"; import { getDefaultNodeWallet2, WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { defaultCoinConfig } from "../harness/denomStructures.js"; import { GlobalTestState, WalletCli } from "../harness/harness.js"; @@ -59,10 +60,18 @@ export async function runAgeRestrictionsPeerTest(t: GlobalTestState) { restrictAge: 13, }); + const purse_expiration = AbsoluteTime.toTimestamp( + AbsoluteTime.addDuration( + AbsoluteTime.now(), + Duration.fromSpec({ days: 2 }), + ), + ); + const initResp = await wallet.client.call(WalletApiOperation.InitiatePeerPushPayment, { - amount: "TESTKUDOS:1", partialContractTerms: { summary: "Hello, World", + amount: "TESTKUDOS:1", + purse_expiration, }, }); diff --git a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts b/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts index 0c149d63a..211f20494 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-pull.ts @@ -17,7 +17,7 @@ /** * Imports. */ -import { j2s } from "@gnu-taler/taler-util"; +import { AbsoluteTime, Duration, j2s } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, WalletCli } from "../harness/harness.js"; import { @@ -47,13 +47,21 @@ export async function runPeerToPeerPullTest(t: GlobalTestState) { await wallet1.runUntilDone(); + const purse_expiration = AbsoluteTime.toTimestamp( + AbsoluteTime.addDuration( + AbsoluteTime.now(), + Duration.fromSpec({ days: 2 }), + ), + ); + const resp = await wallet1.client.call( WalletApiOperation.InitiatePeerPullPayment, { exchangeBaseUrl: exchange.baseUrl, - amount: "TESTKUDOS:5", partialContractTerms: { summary: "Hello World", + amount: "TESTKUDOS:5", + purse_expiration }, }, ); diff --git a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts b/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts index 5f9d64ece..4aaeca624 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-peer-to-peer-push.ts @@ -17,7 +17,7 @@ /** * Imports. */ -import { j2s } from "@gnu-taler/taler-util"; +import { AbsoluteTime, Duration, j2s } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, WalletCli } from "../harness/harness.js"; import { @@ -47,13 +47,21 @@ export async function runPeerToPeerPushTest(t: GlobalTestState) { await wallet1.runUntilDone(); + const purse_expiration = AbsoluteTime.toTimestamp( + AbsoluteTime.addDuration( + AbsoluteTime.now(), + Duration.fromSpec({ days: 2 }), + ), + ); + { const resp = await wallet1.client.call( WalletApiOperation.InitiatePeerPushPayment, { - amount: "TESTKUDOS:5", partialContractTerms: { summary: "Hello World", + amount: "TESTKUDOS:5", + purse_expiration }, }, ); @@ -64,9 +72,10 @@ export async function runPeerToPeerPushTest(t: GlobalTestState) { const resp = await wallet1.client.call( WalletApiOperation.InitiatePeerPushPayment, { - amount: "TESTKUDOS:5", partialContractTerms: { summary: "Hello World", + amount: "TESTKUDOS:5", + purse_expiration }, }, ); |