diff options
author | Florian Dold <florian@dold.me> | 2024-01-09 16:45:06 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-01-09 16:45:10 +0100 |
commit | 46f04b7f123d117cc639db74f66086382a7569c7 (patch) | |
tree | fb2b357af2ccbf26edb15c80fd58dac101cc8281 /packages/taler-harness/src/integrationtests | |
parent | f8cde03f0cb6a7584fb92885f8979a01916a917d (diff) | |
download | wallet-core-46f04b7f123d117cc639db74f66086382a7569c7.tar.xz |
wallet-core: test peer-push-credit expiration
Diffstat (limited to 'packages/taler-harness/src/integrationtests')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts b/packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts index bf0c7a78f..5a1959cc6 100644 --- a/packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts +++ b/packages/taler-harness/src/integrationtests/test-peer-to-peer-push.ts @@ -189,6 +189,19 @@ export async function runPeerToPeerPushTest(t: GlobalTestState) { await peerPushReadyCond2; + const txDetails3 = await w1.walletClient.call( + WalletApiOperation.GetTransactionById, + { + transactionId: initiateResp2.transactionId, + }, + ); + t.assertDeepEqual(txDetails3.type, TransactionType.PeerPushDebit); + t.assertTrue(!!txDetails3.talerUri); + + await w2.walletClient.call(WalletApiOperation.PreparePeerPushCredit, { + talerUri: txDetails3.talerUri, + }); + const timetravelOffsetMs = Duration.toMilliseconds( Duration.fromSpec({ days: 5 }), ); @@ -210,11 +223,20 @@ export async function runPeerToPeerPushTest(t: GlobalTestState) { offsetMs: timetravelOffsetMs, }); + await w2.walletClient.call(WalletApiOperation.TestingSetTimetravel, { + offsetMs: timetravelOffsetMs, + }); + await w1.walletClient.call( WalletApiOperation.TestingWaitTransactionsFinal, {}, ); + await w2.walletClient.call( + WalletApiOperation.TestingWaitTransactionsFinal, + {}, + ); + const txDetails2 = await w1.walletClient.call( WalletApiOperation.GetTransactionById, { |