diff options
author | Florian Dold <florian@dold.me> | 2023-04-05 18:19:14 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-05 18:19:14 +0200 |
commit | 3cf6d15eae299576eada8b501e5848ef29dad03c (patch) | |
tree | 67f9ba90f9ef96376168d522c5c1461b1d2259fd /packages/taler-harness/src/integrationtests/test-wallet-dbless.ts | |
parent | 451400b3a4a0d22a3b6f00cd7c66cec376bcb991 (diff) | |
download | wallet-core-3cf6d15eae299576eada8b501e5848ef29dad03c.tar.xz |
taler-harness: new test
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-wallet-dbless.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-wallet-dbless.ts | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts index 08c10fd91..a1de7617b 100644 --- a/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts +++ b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts @@ -17,7 +17,12 @@ /** * Imports. */ -import { j2s, TalerError } from "@gnu-taler/taler-util"; +import { + encodeCrock, + getRandomBytes, + j2s, + TalerError, +} from "@gnu-taler/taler-util"; import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; import { checkReserve, @@ -80,7 +85,26 @@ export async function runWalletDblessTest(t: GlobalTestState) { exchangeBaseUrl: exchange.baseUrl, }); + const wireSalt = encodeCrock(getRandomBytes(16)); + const merchantPub = encodeCrock(getRandomBytes(32)); + const contractTermsHash = encodeCrock(getRandomBytes(64)); + + await depositCoin({ + contractTermsHash, + merchantPub, + wireSalt, + amount: "TESTKUDOS:4", + coin: coin, + cryptoApi, + exchangeBaseUrl: exchange.baseUrl, + http, + }); + + // Idempotency await depositCoin({ + contractTermsHash, + merchantPub, + wireSalt, amount: "TESTKUDOS:4", coin: coin, cryptoApi, |