diff options
author | Florian Dold <florian@dold.me> | 2023-04-23 22:49:42 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-23 22:49:42 +0200 |
commit | eff3920bd5a2bff58d66ac72ba8bd2c1577f452f (patch) | |
tree | 1e7435da254b56bb9b8a543ce488aeb84f032ac9 /packages/taler-harness | |
parent | 321252040efdb0712a38b3488297a7a802c5cb59 (diff) | |
download | wallet-core-eff3920bd5a2bff58d66ac72ba8bd2c1577f452f.tar.xz |
wallet-core: further towards deposit DD37
Diffstat (limited to 'packages/taler-harness')
-rw-r--r-- | packages/taler-harness/src/index.ts | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts index e8eb57fe9..30b557986 100644 --- a/packages/taler-harness/src/index.ts +++ b/packages/taler-harness/src/index.ts @@ -267,7 +267,7 @@ deploymentCli }); deploymentCli - .subcommand("testTalerdotnetDemo", "test-demo-talerdotnet") + .subcommand("testTalerdotnetDemo", "test-demodottalerdotnet") .action(async (args) => { const http = createPlatformHttpLib(); const cryptiDisp = new CryptoDispatcher( @@ -296,6 +296,35 @@ deploymentCli }); deploymentCli + .subcommand("testDemoTestdotdalerdotnet", "test-testdottalerdotnet") + .action(async (args) => { + const http = createPlatformHttpLib(); + const cryptiDisp = new CryptoDispatcher( + new SynchronousCryptoWorkerFactoryPlain(), + ); + const cryptoApi = cryptiDisp.cryptoApi; + const reserveKeyPair = await cryptoApi.createEddsaKeypair({}); + const exchangeBaseUrl = "https://exchange.test.taler.net/"; + const exchangeInfo = await downloadExchangeInfo(exchangeBaseUrl, http); + await topupReserveWithDemobank({ + amount: "TESTKUDOS:10", + bankAccessApiBaseUrl: + "https://bank.test.taler.net/demobanks/default/access-api/", + exchangeInfo, + http, + reservePub: reserveKeyPair.pub, + }); + let reserveUrl = new URL(`reserves/${reserveKeyPair.pub}`, exchangeBaseUrl); + reserveUrl.searchParams.set("timeout_ms", "30000"); + console.log("requesting", reserveUrl.href); + const longpollReq = http.fetch(reserveUrl.href, { + method: "GET", + }); + const reserveStatusResp = await longpollReq; + console.log("reserve status", reserveStatusResp.status); + }); + +deploymentCli .subcommand("testLocalhostDemo", "test-demo-localhost") .action(async (args) => { // Run checks against the "env-full" demo deployment on localhost |