harness: remove excludeByDefault

This commit is contained in:
Florian Dold 2023-09-06 13:43:46 +02:00
parent 013252efde
commit 3ee3ab3ced
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
10 changed files with 43 additions and 51 deletions

View File

@ -503,9 +503,6 @@ testingCli
if (t.suites.length > 0) { if (t.suites.length > 0) {
s += ` (suites: ${t.suites.join(",")})`; s += ` (suites: ${t.suites.join(",")})`;
} }
if (t.excludeByDefault) {
s += ` [excluded by default]`;
}
if (t.experimental) { if (t.experimental) {
s += ` [experimental]`; s += ` [experimental]`;
} }

View File

@ -145,3 +145,5 @@ export async function runBankApiTest(t: GlobalTestState) {
balResp.balance.credit_debit_indicator === CreditDebitIndicator.Debit, balResp.balance.credit_debit_indicator === CreditDebitIndicator.Debit,
); );
} }
runBankApiTest.suites = ["fakebank"]

View File

@ -78,3 +78,5 @@ export async function runClaimLoopTest(t: GlobalTestState) {
await t.shutdown(); await t.shutdown();
} }
runClaimLoopTest.suites = ["merchant"];

View File

@ -100,4 +100,4 @@ export async function runClauseSchnorrTest(t: GlobalTestState) {
} }
runClauseSchnorrTest.suites = ["experimental-wallet"]; runClauseSchnorrTest.suites = ["experimental-wallet"];
runClauseSchnorrTest.excludeByDefault = true; runClauseSchnorrTest.experimental = true;

View File

@ -102,3 +102,5 @@ export async function runDepositTest(t: GlobalTestState) {
// deposit and wire fees. // deposit and wire fees.
t.assertDeepEqual(transactions.transactions[1].amountRaw, "TESTKUDOS:9.79"); t.assertDeepEqual(transactions.transactions[1].amountRaw, "TESTKUDOS:9.79");
} }
runDepositTest.suites = ["wallet"];

View File

@ -72,5 +72,5 @@ export async function runLibeufinApiSandboxCamtTest(t: GlobalTestState) {
let ret = await LibeufinSandboxApi.getCamt053(sandbox, "mock-account-1"); let ret = await LibeufinSandboxApi.getCamt053(sandbox, "mock-account-1");
console.log(ret); console.log(ret);
} }
runLibeufinApiSandboxCamtTest.excludeByDefault = true; runLibeufinApiSandboxCamtTest.experimental = true;
runLibeufinApiSandboxCamtTest.suites = ["libeufin"]; runLibeufinApiSandboxCamtTest.suites = ["libeufin"];

View File

@ -114,4 +114,4 @@ export async function runLibeufinNexusBalanceTest(t: GlobalTestState) {
} }
runLibeufinNexusBalanceTest.suites = ["libeufin"]; runLibeufinNexusBalanceTest.suites = ["libeufin"];
runLibeufinNexusBalanceTest.excludeByDefault = true; runLibeufinNexusBalanceTest.experimental = true;

View File

@ -233,4 +233,4 @@ export async function runRevocationTest(t: GlobalTestState) {
runRevocationTest.timeoutMs = 120000; runRevocationTest.timeoutMs = 120000;
runRevocationTest.suites = ["wallet"]; runRevocationTest.suites = ["wallet"];
runRevocationTest.excludeByDefault = true; runRevocationTest.experimental = true;

View File

@ -114,4 +114,5 @@ export async function runWithdrawalHugeTest(t: GlobalTestState) {
} }
runWithdrawalHugeTest.suites = ["wallet-perf"]; runWithdrawalHugeTest.suites = ["wallet-perf"];
runWithdrawalHugeTest.excludeByDefault = true; // FIXME: Should not be "experimental" but "slow" or something similar.
runWithdrawalHugeTest.experimental = true;

View File

@ -14,39 +14,39 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/ */
import { import { CancellationToken, Logger, minimatch } from "@gnu-taler/taler-util";
CancellationToken,
Logger,
minimatch,
setGlobalLogLevelFromString,
} from "@gnu-taler/taler-util";
import * as child_process from "child_process"; import * as child_process from "child_process";
import { spawnSync } from "child_process";
import * as fs from "fs"; import * as fs from "fs";
import * as os from "os"; import * as os from "os";
import * as path from "path"; import * as path from "path";
import url from "url"; import url from "url";
import { import {
GlobalTestState, GlobalTestState,
runCommand, TestRunResult,
runTestWithState, runTestWithState,
shouldLingerInTest, shouldLingerInTest,
TestRunResult,
} from "../harness/harness.js"; } from "../harness/harness.js";
import { spawnSync } from "child_process"; import { getSharedTestDir } from "../harness/helpers.js";
import { runAgeRestrictionsMerchantTest } from "./test-age-restrictions-merchant.js"; import { runAgeRestrictionsMerchantTest } from "./test-age-restrictions-merchant.js";
import { runAgeRestrictionsMixedMerchantTest } from "./test-age-restrictions-mixed-merchant.js";
import { runAgeRestrictionsPeerTest } from "./test-age-restrictions-peer.js";
import { runBankApiTest } from "./test-bank-api.js"; import { runBankApiTest } from "./test-bank-api.js";
import { runClaimLoopTest } from "./test-claim-loop.js"; import { runClaimLoopTest } from "./test-claim-loop.js";
import { runClauseSchnorrTest } from "./test-clause-schnorr.js"; import { runClauseSchnorrTest } from "./test-clause-schnorr.js";
import { runDenomUnofferedTest } from "./test-denom-unoffered.js"; import { runDenomUnofferedTest } from "./test-denom-unoffered.js";
import { runDepositTest } from "./test-deposit.js"; import { runDepositTest } from "./test-deposit.js";
import { runExchangeDepositTest } from "./test-exchange-deposit.js";
import { runExchangeManagementTest } from "./test-exchange-management.js"; import { runExchangeManagementTest } from "./test-exchange-management.js";
import { runExchangePurseTest } from "./test-exchange-purse.js";
import { runExchangeTimetravelTest } from "./test-exchange-timetravel.js"; import { runExchangeTimetravelTest } from "./test-exchange-timetravel.js";
import { runFeeRegressionTest } from "./test-fee-regression.js"; import { runFeeRegressionTest } from "./test-fee-regression.js";
import { runForcedSelectionTest } from "./test-forced-selection.js"; import { runForcedSelectionTest } from "./test-forced-selection.js";
import { runKycTest } from "./test-kyc.js";
import { runLibeufinApiBankaccountTest } from "./test-libeufin-api-bankaccount.js"; import { runLibeufinApiBankaccountTest } from "./test-libeufin-api-bankaccount.js";
import { runLibeufinApiBankconnectionTest } from "./test-libeufin-api-bankconnection.js"; import { runLibeufinApiBankconnectionTest } from "./test-libeufin-api-bankconnection.js";
import { runLibeufinApiFacadeTest } from "./test-libeufin-api-facade.js";
import { runLibeufinApiFacadeBadRequestTest } from "./test-libeufin-api-facade-bad-request.js"; import { runLibeufinApiFacadeBadRequestTest } from "./test-libeufin-api-facade-bad-request.js";
import { runLibeufinApiFacadeTest } from "./test-libeufin-api-facade.js";
import { runLibeufinApiPermissionsTest } from "./test-libeufin-api-permissions.js"; import { runLibeufinApiPermissionsTest } from "./test-libeufin-api-permissions.js";
import { runLibeufinApiSandboxCamtTest } from "./test-libeufin-api-sandbox-camt.js"; import { runLibeufinApiSandboxCamtTest } from "./test-libeufin-api-sandbox-camt.js";
import { runLibeufinApiSandboxTransactionsTest } from "./test-libeufin-api-sandbox-transactions.js"; import { runLibeufinApiSandboxTransactionsTest } from "./test-libeufin-api-sandbox-transactions.js";
@ -58,64 +58,58 @@ import { runLibeufinC5xTest } from "./test-libeufin-c5x.js";
import { runLibeufinAnastasisFacadeTest } from "./test-libeufin-facade-anastasis.js"; import { runLibeufinAnastasisFacadeTest } from "./test-libeufin-facade-anastasis.js";
import { runLibeufinKeyrotationTest } from "./test-libeufin-keyrotation.js"; import { runLibeufinKeyrotationTest } from "./test-libeufin-keyrotation.js";
import { runLibeufinNexusBalanceTest } from "./test-libeufin-nexus-balance.js"; import { runLibeufinNexusBalanceTest } from "./test-libeufin-nexus-balance.js";
import { runLibeufinRefundTest } from "./test-libeufin-refund.js";
import { runLibeufinRefundMultipleUsersTest } from "./test-libeufin-refund-multiple-users.js"; import { runLibeufinRefundMultipleUsersTest } from "./test-libeufin-refund-multiple-users.js";
import { runLibeufinRefundTest } from "./test-libeufin-refund.js";
import { runLibeufinSandboxWireTransferCliTest } from "./test-libeufin-sandbox-wire-transfer-cli.js"; import { runLibeufinSandboxWireTransferCliTest } from "./test-libeufin-sandbox-wire-transfer-cli.js";
import { runLibeufinTutorialTest } from "./test-libeufin-tutorial.js"; import { runLibeufinTutorialTest } from "./test-libeufin-tutorial.js";
import { runMerchantExchangeConfusionTest } from "./test-merchant-exchange-confusion.js"; import { runMerchantExchangeConfusionTest } from "./test-merchant-exchange-confusion.js";
import { runMerchantInstancesTest } from "./test-merchant-instances.js";
import { runMerchantInstancesDeleteTest } from "./test-merchant-instances-delete.js"; import { runMerchantInstancesDeleteTest } from "./test-merchant-instances-delete.js";
import { runMerchantInstancesUrlsTest } from "./test-merchant-instances-urls.js"; import { runMerchantInstancesUrlsTest } from "./test-merchant-instances-urls.js";
import { runMerchantInstancesTest } from "./test-merchant-instances.js";
import { runMerchantLongpollingTest } from "./test-merchant-longpolling.js"; import { runMerchantLongpollingTest } from "./test-merchant-longpolling.js";
import { runMerchantRefundApiTest } from "./test-merchant-refund-api.js"; import { runMerchantRefundApiTest } from "./test-merchant-refund-api.js";
import { runMerchantSpecPublicOrdersTest } from "./test-merchant-spec-public-orders.js"; import { runMerchantSpecPublicOrdersTest } from "./test-merchant-spec-public-orders.js";
import { runPayPaidTest } from "./test-pay-paid.js"; import { runPayPaidTest } from "./test-pay-paid.js";
import { runPaymentTest } from "./test-payment.js"; import { runPaymentAbortTest } from "./test-payment-abort.js";
import { runPaymentClaimTest } from "./test-payment-claim.js"; import { runPaymentClaimTest } from "./test-payment-claim.js";
import { runPaymentExpiredTest } from "./test-payment-expired.js";
import { runPaymentFaultTest } from "./test-payment-fault.js"; import { runPaymentFaultTest } from "./test-payment-fault.js";
import { runPaymentForgettableTest } from "./test-payment-forgettable.js"; import { runPaymentForgettableTest } from "./test-payment-forgettable.js";
import { runPaymentIdempotencyTest } from "./test-payment-idempotency.js"; import { runPaymentIdempotencyTest } from "./test-payment-idempotency.js";
import { runPaymentMultipleTest } from "./test-payment-multiple.js"; import { runPaymentMultipleTest } from "./test-payment-multiple.js";
import { runPaymentShareTest } from "./test-payment-share.js";
import { runPaymentTemplateTest } from "./test-payment-template.js";
import { runPaymentTransientTest } from "./test-payment-transient.js"; import { runPaymentTransientTest } from "./test-payment-transient.js";
import { runPaymentZeroTest } from "./test-payment-zero.js"; import { runPaymentZeroTest } from "./test-payment-zero.js";
import { runPaymentTest } from "./test-payment.js";
import { runPaywallFlowTest } from "./test-paywall-flow.js"; import { runPaywallFlowTest } from "./test-paywall-flow.js";
import { runPeerRepairTest } from "./test-peer-repair.js";
import { runPeerToPeerPullTest } from "./test-peer-to-peer-pull.js"; import { runPeerToPeerPullTest } from "./test-peer-to-peer-pull.js";
import { runPeerToPeerPushTest } from "./test-peer-to-peer-push.js"; import { runPeerToPeerPushTest } from "./test-peer-to-peer-push.js";
import { runRefundTest } from "./test-refund.js";
import { runRefundAutoTest } from "./test-refund-auto.js"; import { runRefundAutoTest } from "./test-refund-auto.js";
import { runRefundGoneTest } from "./test-refund-gone.js"; import { runRefundGoneTest } from "./test-refund-gone.js";
import { runRefundIncrementalTest } from "./test-refund-incremental.js"; import { runRefundIncrementalTest } from "./test-refund-incremental.js";
import { runRefundTest } from "./test-refund.js";
import { runRevocationTest } from "./test-revocation.js"; import { runRevocationTest } from "./test-revocation.js";
import { runSimplePaymentTest } from "./test-simple-payment.js";
import { runStoredBackupsTest } from "./test-stored-backups.js";
import { runTimetravelAutorefreshTest } from "./test-timetravel-autorefresh.js"; import { runTimetravelAutorefreshTest } from "./test-timetravel-autorefresh.js";
import { runTimetravelWithdrawTest } from "./test-timetravel-withdraw.js"; import { runTimetravelWithdrawTest } from "./test-timetravel-withdraw.js";
import { runTippingTest } from "./test-tipping.js"; import { runTippingTest } from "./test-tipping.js";
import { runTermOfServiceFormatTest } from "./test-tos-format.js";
import { runWalletBackupBasicTest } from "./test-wallet-backup-basic.js"; import { runWalletBackupBasicTest } from "./test-wallet-backup-basic.js";
import { runWalletBackupDoublespendTest } from "./test-wallet-backup-doublespend.js"; import { runWalletBackupDoublespendTest } from "./test-wallet-backup-doublespend.js";
import { runWalletBalanceTest } from "./test-wallet-balance.js";
import { runWalletCryptoWorkerTest } from "./test-wallet-cryptoworker.js";
import { runWalletDblessTest } from "./test-wallet-dbless.js"; import { runWalletDblessTest } from "./test-wallet-dbless.js";
import { runWalletNotificationsTest } from "./test-wallet-notifications.js";
import { runWallettestingTest } from "./test-wallettesting.js"; import { runWallettestingTest } from "./test-wallettesting.js";
import { runWithdrawalAbortBankTest } from "./test-withdrawal-abort-bank.js"; import { runWithdrawalAbortBankTest } from "./test-withdrawal-abort-bank.js";
import { runWithdrawalBankIntegratedTest } from "./test-withdrawal-bank-integrated.js"; import { runWithdrawalBankIntegratedTest } from "./test-withdrawal-bank-integrated.js";
import { runWithdrawalFakebankTest } from "./test-withdrawal-fakebank.js"; import { runWithdrawalFakebankTest } from "./test-withdrawal-fakebank.js";
import { runWithdrawalManualTest } from "./test-withdrawal-manual.js";
import { runAgeRestrictionsPeerTest } from "./test-age-restrictions-peer.js";
import { runWalletNotificationsTest } from "./test-wallet-notifications.js";
import { runAgeRestrictionsMixedMerchantTest } from "./test-age-restrictions-mixed-merchant.js";
import { runWalletCryptoWorkerTest } from "./test-wallet-cryptoworker.js";
import { runWithdrawalHugeTest } from "./test-withdrawal-huge.js";
import { runKycTest } from "./test-kyc.js";
import { runPaymentAbortTest } from "./test-payment-abort.js";
import { runWithdrawalFeesTest } from "./test-withdrawal-fees.js"; import { runWithdrawalFeesTest } from "./test-withdrawal-fees.js";
import { runWalletBalanceTest } from "./test-wallet-balance.js"; import { runWithdrawalHugeTest } from "./test-withdrawal-huge.js";
import { runPaymentTemplateTest } from "./test-payment-template.js"; import { runWithdrawalManualTest } from "./test-withdrawal-manual.js";
import { runExchangeDepositTest } from "./test-exchange-deposit.js";
import { runPeerRepairTest } from "./test-peer-repair.js";
import { runPaymentShareTest } from "./test-payment-share.js";
import { runSimplePaymentTest } from "./test-simple-payment.js";
import { runTermOfServiceFormatTest } from "./test-tos-format.js";
import { runExchangePurseTest } from "./test-exchange-purse.js";
import { getSharedTestDir } from "../harness/helpers.js";
import { runStoredBackupsTest } from "./test-stored-backups.js";
import { runPaymentExpiredTest } from "./test-payment-expired.js";
/** /**
* Test runner. * Test runner.
@ -128,7 +122,6 @@ const logger = new Logger("testrunner.ts");
interface TestMainFunction { interface TestMainFunction {
(t: GlobalTestState): Promise<void>; (t: GlobalTestState): Promise<void>;
timeoutMs?: number; timeoutMs?: number;
excludeByDefault?: boolean;
experimental?: boolean; experimental?: boolean;
suites?: string[]; suites?: string[];
} }
@ -232,7 +225,6 @@ export interface TestRunSpec {
export interface TestInfo { export interface TestInfo {
name: string; name: string;
suites: string[]; suites: string[];
excludeByDefault: boolean;
experimental: boolean; experimental: boolean;
} }
@ -337,19 +329,16 @@ export async function runTests(spec: TestRunSpec) {
continue; continue;
} }
if (testCase.experimental && !spec.includeExperimental) {
continue;
}
if (suites) { if (suites) {
const ts = new Set(testCase.suites ?? []); const ts = new Set(testCase.suites ?? []);
const intersection = new Set([...suites].filter((x) => ts.has(x))); const intersection = new Set([...suites].filter((x) => ts.has(x)));
if (intersection.size === 0) { if (intersection.size === 0) {
continue; continue;
} }
} else {
if (testCase.excludeByDefault) {
continue;
}
if (testCase.experimental && !spec.includeExperimental) {
continue;
}
} }
if (spec.dryRun) { if (spec.dryRun) {
@ -525,7 +514,6 @@ export function getTestInfo(): TestInfo[] {
return allTests.map((x) => ({ return allTests.map((x) => ({
name: getTestName(x), name: getTestName(x),
suites: x.suites ?? [], suites: x.suites ?? [],
excludeByDefault: x.excludeByDefault ?? false,
experimental: x.experimental ?? false, experimental: x.experimental ?? false,
})); }));
} }