aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-08-19 13:48:36 +0200
committerFlorian Dold <florian@dold.me>2021-08-19 13:48:45 +0200
commit3ce740d87dc51c2f9a330d3e12237ba1fdd5f2e7 (patch)
treef47e2abbfab0d54fc198407fae1e8a250c010362 /packages/taler-wallet-cli
parent97a05ff659af274dcfcd9c76bf19100bbd51ce0e (diff)
store 'list issue date' of denoms, cleanup
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/index.ts13
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts4
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts4
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts5
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/testrunner.ts9
5 files changed, 26 insertions, 9 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 673bfab2a..796b6ae14 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -901,12 +901,12 @@ deploymentCli
.action(async (args) => {
let out = "";
- const stamp = Math.floor((new Date()).getTime() / 1000);
+ const stamp = Math.floor(new Date().getTime() / 1000);
const min = Amounts.parseOrThrow(args.coincfg.minAmount);
const max = Amounts.parseOrThrow(args.coincfg.maxAmount);
if (min.currency != max.currency) {
- console.error("currency mismatch")
+ console.error("currency mismatch");
process.exit(1);
}
const currency = min.currency;
@@ -961,7 +961,14 @@ testCli
.subcommand("listIntegrationtests", "list-integrationtests")
.action(async (args) => {
for (const t of getTestInfo()) {
- console.log(t.name);
+ let s = t.name;
+ if (t.suites.length > 0) {
+ s += ` (suites: ${t.suites.join(",")})`;
+ }
+ if (t.excludeByDefault) {
+ s += ` [excluded by default]`;
+ }
+ console.log(s);
}
});
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts b/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts
index bf8ed7a33..64645dce2 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-pay-paid.ts
@@ -145,10 +145,10 @@ export async function runPayPaidTest(t: GlobalTestState) {
console.log(publicOrderStatusResp.data);
- if (publicOrderStatusResp.status != 202) {
+ if (publicOrderStatusResp.status != 200) {
console.log(publicOrderStatusResp.data);
throw Error(
- `expected status 202 (after paying), but got ${publicOrderStatusResp.status}`,
+ `expected status 200 (after paying), but got ${publicOrderStatusResp.status}`,
);
}
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts
index d490a8c1b..0dabc9ca5 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-on-demo.ts
@@ -24,8 +24,6 @@ import {
BankAccessApi
} from "./harness";
import {
- createSimpleTestkudosEnvironment,
- withdrawViaBank,
makeTestPayment,
} from "./helpers";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
@@ -96,4 +94,6 @@ export async function runPaymentDemoTest(t: GlobalTestState) {
t.assertTrue(balanceAfter["balances"].length == 1);
t.assertTrue(balanceBefore["balances"][0]["available"] > balanceAfter["balances"][0]["available"]);
}
+
+runPaymentDemoTest.excludeByDefault = true;
runPaymentDemoTest.suites = ["buildbot"];
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts
index 2c417e715..b171ff66a 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-transient.ts
@@ -169,16 +169,17 @@ export async function runPaymentTransientTest(t: GlobalTestState) {
// Now ask the merchant if paid
+ console.log("requesting", publicOrderStatusUrl);
publicOrderStatusResp = await axios.get(publicOrderStatusUrl, {
validateStatus: () => true,
});
console.log(publicOrderStatusResp.data);
- if (publicOrderStatusResp.status != 202) {
+ if (publicOrderStatusResp.status != 200) {
console.log(publicOrderStatusResp.data);
throw Error(
- `expected status 202 (after paying), but got ${publicOrderStatusResp.status}`,
+ `expected status 200 (after paying), but got ${publicOrderStatusResp.status}`,
);
}
}
diff --git a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
index cb1d621b6..1c090881e 100644
--- a/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/testrunner.ts
@@ -90,6 +90,7 @@ import { runMerchantSpecPublicOrdersTest } from "./test-merchant-spec-public-ord
interface TestMainFunction {
(t: GlobalTestState): Promise<void>;
timeoutMs?: number;
+ excludeByDefault?: boolean;
suites?: string[];
}
@@ -157,6 +158,8 @@ export interface TestRunSpec {
export interface TestInfo {
name: string;
+ suites: string[];
+ excludeByDefault: boolean;
}
function updateCurrentSymlink(testDir: string): void {
@@ -236,6 +239,10 @@ export async function runTests(spec: TestRunSpec) {
if (intersection.size === 0) {
continue;
}
+ } else {
+ if (testCase.excludeByDefault) {
+ continue;
+ }
}
if (spec.dryRun) {
@@ -389,6 +396,8 @@ export function reportAndQuit(
export function getTestInfo(): TestInfo[] {
return allTests.map((x) => ({
name: getTestName(x),
+ suites: x.suites ?? [],
+ excludeByDefault: x.excludeByDefault ?? false,
}));
}