aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/index.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-04-23 22:49:42 +0200
committerFlorian Dold <florian@dold.me>2023-04-23 22:49:42 +0200
commiteff3920bd5a2bff58d66ac72ba8bd2c1577f452f (patch)
tree1e7435da254b56bb9b8a543ce488aeb84f032ac9 /packages/taler-harness/src/index.ts
parent321252040efdb0712a38b3488297a7a802c5cb59 (diff)
downloadwallet-core-eff3920bd5a2bff58d66ac72ba8bd2c1577f452f.tar.xz
wallet-core: further towards deposit DD37
Diffstat (limited to 'packages/taler-harness/src/index.ts')
-rw-r--r--packages/taler-harness/src/index.ts31
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