[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: tests: logging for test-paywa
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: tests: logging for test-paywall-flow |
Date: |
Sun, 08 Aug 2021 13:35:46 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 425ea0fb tests: logging for test-paywall-flow
425ea0fb is described below
commit 425ea0fbca5a954fc9f9c13e7b19d72aed7efe25
Author: Florian Dold <florian@dold.me>
AuthorDate: Sun Aug 8 13:35:35 2021 +0200
tests: logging for test-paywall-flow
---
.../src/integrationtests/test-paywall-flow.ts | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git
a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
b/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
index 9312fb9a..25c8862c 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-paywall-flow.ts
@@ -23,6 +23,7 @@ import {
PreparePayResultType,
codecForMerchantOrderStatusUnpaid,
ConfirmPayResultType,
+ URL,
} from "@gnu-taler/taler-util";
import axios from "axios";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
@@ -74,9 +75,9 @@ export async function runPaywallFlowTest(t: GlobalTestState) {
const talerPayUriOne = orderStatus.taler_pay_uri;
t.assertTrue(orderStatus.already_paid_order_id === undefined);
- let publicOrderStatusUrl = orderStatus.order_status_url;
+ let publicOrderStatusUrl = new URL(orderStatus.order_status_url);
- let publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
+ let publicOrderStatusResp = await axios.get(publicOrderStatusUrl.href, {
validateStatus: () => true,
});
@@ -103,10 +104,11 @@ export async function runPaywallFlowTest(t:
GlobalTestState) {
const proposalId = preparePayResp.proposalId;
- publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
+ console.log("requesting", publicOrderStatusUrl.href);
+ publicOrderStatusResp = await axios.get(publicOrderStatusUrl.href, {
validateStatus: () => true,
});
-
+ console.log("response body", publicOrderStatusResp.data);
if (publicOrderStatusResp.status != 402) {
throw Error(
`expected status 402 (after claiming), but got
${publicOrderStatusResp.status}`,
@@ -126,7 +128,7 @@ export async function runPaywallFlowTest(t:
GlobalTestState) {
t.assertTrue(confirmPayRes.type === ConfirmPayResultType.Done);
- publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
+ publicOrderStatusResp = await axios.get(publicOrderStatusUrl.href, {
validateStatus: () => true,
});
@@ -192,7 +194,7 @@ export async function runPaywallFlowTest(t:
GlobalTestState) {
t.assertTrue(orderStatus.order_status === "unpaid");
t.assertTrue(orderStatus.already_paid_order_id === undefined);
- publicOrderStatusUrl = orderStatus.order_status_url;
+ publicOrderStatusUrl = new URL(orderStatus.order_status_url);
// Here the re-purchase detection should kick in,
// and the wallet should re-pay for the old order
@@ -230,7 +232,7 @@ export async function runPaywallFlowTest(t:
GlobalTestState) {
console.log("requesting public status", publicOrderStatusUrl);
// Ask the order status of the claimed-but-unpaid order
- publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
+ publicOrderStatusResp = await axios.get(publicOrderStatusUrl.href, {
validateStatus: () => true,
});
@@ -247,4 +249,4 @@ export async function runPaywallFlowTest(t:
GlobalTestState) {
t.assertTrue(pubUnpaidStatus.already_paid_order_id === firstOrderId);
}
-runPaywallFlowTest.suites = ["wallet"];
+runPaywallFlowTest.suites = ["merchant", "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: tests: logging for test-paywall-flow,
gnunet <=