diff options
Diffstat (limited to 'packages/taler-harness/src/index.ts')
-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 |