[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: more integration test for age
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: more integration test for age restriction: trying to pay age-restricted contract with not-age-restricted coins and using age-restricted coins with not-age-restricted-contract |
Date: |
Thu, 05 May 2022 17:59:53 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new cad6d994 more integration test for age restriction: trying to pay
age-restricted contract with not-age-restricted coins and using age-restricted
coins with not-age-restricted-contract
cad6d994 is described below
commit cad6d99453a2fd289dcc4b0a0fceee0407cca362
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu May 5 12:59:43 2022 -0300
more integration test for age restriction: trying to pay age-restricted
contract with not-age-restricted coins and using age-restricted coins with
not-age-restricted-contract
---
.../src/integrationtests/test-age-restrictions.ts | 90 +++++++++++++++++-----
1 file changed, 69 insertions(+), 21 deletions(-)
diff --git
a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions.ts
b/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions.ts
index 9f523ae5..c290fe91 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-age-restrictions.ts
@@ -18,7 +18,7 @@
* Imports.
*/
import { defaultCoinConfig } from "../harness/denomStructures.js";
-import { GlobalTestState } from "../harness/harness.js";
+import { GlobalTestState, WalletCli } from "../harness/harness.js";
import {
createSimpleTestkudosEnvironment,
withdrawViaBank,
@@ -31,7 +31,7 @@ import {
export async function runAgeRestrictionsTest(t: GlobalTestState) {
// Set up test environment
- const { wallet, bank, exchange, merchant } =
+ const { wallet: walletOne, bank, exchange, merchant } =
await createSimpleTestkudosEnvironment(
t,
defaultCoinConfig.map((x) => x("TESTKUDOS")),
@@ -40,25 +40,73 @@ export async function runAgeRestrictionsTest(t:
GlobalTestState) {
},
);
- // Withdraw digital cash into the wallet.
-
- await withdrawViaBank(t, {
- wallet,
- bank,
- exchange,
- amount: "TESTKUDOS:20",
- restrictAge: 13,
- });
-
- const order = {
- summary: "Buy me!",
- amount: "TESTKUDOS:5",
- fulfillment_url: "taler://fulfillment-success/thx",
- minimum_age: 9,
- };
-
- await makeTestPayment(t, { wallet, merchant, order });
- await wallet.runUntilDone();
+ const walletTwo = new WalletCli(t, "walletTwo");
+ const walletThree = new WalletCli(t, "walletThree");
+
+ {
+ const wallet = walletOne;
+
+ await withdrawViaBank(t, {
+ wallet,
+ bank,
+ exchange,
+ amount: "TESTKUDOS:20",
+ restrictAge: 13,
+ });
+
+ const order = {
+ summary: "Buy me!",
+ amount: "TESTKUDOS:5",
+ fulfillment_url: "taler://fulfillment-success/thx",
+ minimum_age: 9,
+ };
+
+ await makeTestPayment(t, { wallet, merchant, order });
+ await wallet.runUntilDone();
+ }
+
+ {
+ const wallet = walletTwo;
+
+ await withdrawViaBank(t, {
+ wallet,
+ bank,
+ exchange,
+ amount: "TESTKUDOS:20",
+ restrictAge: 13,
+ });
+
+ const order = {
+ summary: "Buy me!",
+ amount: "TESTKUDOS:5",
+ fulfillment_url: "taler://fulfillment-success/thx",
+ };
+
+ await makeTestPayment(t, { wallet, merchant, order });
+ await wallet.runUntilDone();
+ }
+
+ {
+ const wallet = walletThree;
+
+ await withdrawViaBank(t, {
+ wallet,
+ bank,
+ exchange,
+ amount: "TESTKUDOS:20",
+ });
+
+ const order = {
+ summary: "Buy me!",
+ amount: "TESTKUDOS:5",
+ fulfillment_url: "taler://fulfillment-success/thx",
+ minimum_age: 9,
+ };
+
+ await makeTestPayment(t, { wallet, merchant, order });
+ await wallet.runUntilDone();
+ }
+
}
runAgeRestrictionsTest.suites = ["wallet"];
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: more integration test for age restriction: trying to pay age-restricted contract with not-age-restricted coins and using age-restricted coins with not-age-restricted-contract,
gnunet <=