aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-10-30 19:51:00 +0100
committerFlorian Dold <florian@dold.me>2024-10-30 19:51:00 +0100
commit72dfb31125aba1dc184f1cac065206fe000ba08f (patch)
tree74c6e8a65730852b5a6f578014bcbaf5b4bcb32b /packages/taler-harness/src/integrationtests
parent336b1619972a27a7227b2d744580d0687e9f3b19 (diff)
-some tests now need merchant priv
Diffstat (limited to 'packages/taler-harness/src/integrationtests')
-rw-r--r--packages/taler-harness/src/integrationtests/test-exchange-deposit.ts10
-rw-r--r--packages/taler-harness/src/integrationtests/test-wallet-dbless.ts9
2 files changed, 15 insertions, 4 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
index 01bae78de..cc8772866 100644
--- a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
+++ b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
@@ -37,8 +37,8 @@ import {
topupReserveWithBank,
withdrawCoin,
} from "@gnu-taler/taler-wallet-core/dbless";
-import { GlobalTestState } from "../harness/harness.js";
import { createSimpleTestkudosEnvironmentV2 } from "../harness/environments.js";
+import { GlobalTestState } from "../harness/harness.js";
/**
* Run test for basic, bank-integrated withdrawal and payment.
@@ -56,6 +56,10 @@ export async function runExchangeDepositTest(t: GlobalTestState) {
);
const cryptoApi = cryptiDisp.cryptoApi;
+ const merchantPair = await cryptoApi.createEddsaKeypair({});
+ const merchantPub = merchantPair.pub;
+ const merchantPriv = merchantPair.priv;
+
try {
// Withdraw digital cash into the wallet.
@@ -93,12 +97,12 @@ export async function runExchangeDepositTest(t: GlobalTestState) {
});
const wireSalt = encodeCrock(getRandomBytes(16));
- const merchantPub = encodeCrock(getRandomBytes(32));
const contractTermsHash = encodeCrock(getRandomBytes(64));
await depositCoin({
contractTermsHash,
merchantPub,
+ merchantPriv,
wireSalt,
amount: "TESTKUDOS:4" as AmountString,
coin: coin,
@@ -111,6 +115,7 @@ export async function runExchangeDepositTest(t: GlobalTestState) {
await depositCoin({
contractTermsHash,
merchantPub,
+ merchantPriv,
wireSalt,
amount: "TESTKUDOS:4" as AmountString,
coin: coin,
@@ -124,6 +129,7 @@ export async function runExchangeDepositTest(t: GlobalTestState) {
await depositCoin({
contractTermsHash,
merchantPub,
+ merchantPriv,
wireSalt,
amount: "TESTKUDOS:3.5" as AmountString,
coin: coin,
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts
index 6274ff2b4..a9a3c5174 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts
@@ -37,8 +37,8 @@ import {
topupReserveWithBank,
withdrawCoin,
} from "@gnu-taler/taler-wallet-core/dbless";
-import { GlobalTestState, harnessHttpLib } from "../harness/harness.js";
import { createSimpleTestkudosEnvironmentV2 } from "../harness/environments.js";
+import { GlobalTestState, harnessHttpLib } from "../harness/harness.js";
/**
* Run test for basic, bank-integrated withdrawal and payment.
@@ -54,6 +54,10 @@ export async function runWalletDblessTest(t: GlobalTestState) {
);
const cryptoApi = cryptiDisp.cryptoApi;
+ const merchantPair = await cryptoApi.createEddsaKeypair({});
+ const merchantPub = merchantPair.pub;
+ const merchantPriv = merchantPair.priv;
+
try {
// Withdraw digital cash into the wallet.
@@ -103,12 +107,12 @@ export async function runWalletDblessTest(t: GlobalTestState) {
});
const wireSalt = encodeCrock(getRandomBytes(16));
- const merchantPub = encodeCrock(getRandomBytes(32));
const contractTermsHash = encodeCrock(getRandomBytes(64));
await depositCoin({
contractTermsHash,
merchantPub,
+ merchantPriv,
wireSalt,
amount: "TESTKUDOS:4" as AmountString,
coin: coin,
@@ -121,6 +125,7 @@ export async function runWalletDblessTest(t: GlobalTestState) {
await depositCoin({
contractTermsHash,
merchantPub,
+ merchantPriv,
wireSalt,
amount: "TESTKUDOS:4" as AmountString,
coin: coin,