diff options
author | Florian Dold <florian@dold.me> | 2023-09-06 13:43:46 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-06 13:43:46 +0200 |
commit | 3ee3ab3cedf64ea643055a5b99ae5d35385ea037 (patch) | |
tree | d69becc4f3f9043386711badc7639aef03f301e8 | |
parent | 013252efdeeb410b249ce33fc37ac90dbbf663c6 (diff) |
harness: remove excludeByDefault
10 files changed, 43 insertions, 51 deletions
diff --git a/packages/taler-harness/src/index.ts b/packages/taler-harness/src/index.ts index 534aec8c7..f5d4fd2c2 100644 --- a/packages/taler-harness/src/index.ts +++ b/packages/taler-harness/src/index.ts @@ -503,9 +503,6 @@ testingCli if (t.suites.length > 0) { s += ` (suites: ${t.suites.join(",")})`; } - if (t.excludeByDefault) { - s += ` [excluded by default]`; - } if (t.experimental) { s += ` [experimental]`; } diff --git a/packages/taler-harness/src/integrationtests/test-bank-api.ts b/packages/taler-harness/src/integrationtests/test-bank-api.ts index 77a13b791..1c359732e 100644 --- a/packages/taler-harness/src/integrationtests/test-bank-api.ts +++ b/packages/taler-harness/src/integrationtests/test-bank-api.ts @@ -145,3 +145,5 @@ export async function runBankApiTest(t: GlobalTestState) { balResp.balance.credit_debit_indicator === CreditDebitIndicator.Debit, ); } + +runBankApiTest.suites = ["fakebank"]
\ No newline at end of file diff --git a/packages/taler-harness/src/integrationtests/test-claim-loop.ts b/packages/taler-harness/src/integrationtests/test-claim-loop.ts index 652df72ec..a424e0101 100644 --- a/packages/taler-harness/src/integrationtests/test-claim-loop.ts +++ b/packages/taler-harness/src/integrationtests/test-claim-loop.ts @@ -78,3 +78,5 @@ export async function runClaimLoopTest(t: GlobalTestState) { await t.shutdown(); } + +runClaimLoopTest.suites = ["merchant"];
\ No newline at end of file diff --git a/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts b/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts index 9a839b677..a5ad382a7 100644 --- a/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts +++ b/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts @@ -100,4 +100,4 @@ export async function runClauseSchnorrTest(t: GlobalTestState) { } runClauseSchnorrTest.suites = ["experimental-wallet"]; -runClauseSchnorrTest.excludeByDefault = true; +runClauseSchnorrTest.experimental = true; diff --git a/packages/taler-harness/src/integrationtests/test-deposit.ts b/packages/taler-harness/src/integrationtests/test-deposit.ts index 8ea3fc12e..7e1bb2a5c 100644 --- a/packages/taler-harness/src/integrationtests/test-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-deposit.ts @@ -102,3 +102,5 @@ export async function runDepositTest(t: GlobalTestState) { // deposit and wire fees. t.assertDeepEqual(transactions.transactions[1].amountRaw, "TESTKUDOS:9.79"); } + +runDepositTest.suites = ["wallet"]; diff --git a/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts b/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts index 239bab334..22b411dc2 100644 --- a/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-api-sandbox-camt.ts @@ -72,5 +72,5 @@ export async function runLibeufinApiSandboxCamtTest(t: GlobalTestState) { let ret = await LibeufinSandboxApi.getCamt053(sandbox, "mock-account-1"); console.log(ret); } -runLibeufinApiSandboxCamtTest.excludeByDefault = true; +runLibeufinApiSandboxCamtTest.experimental = true; runLibeufinApiSandboxCamtTest.suites = ["libeufin"]; diff --git a/packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts b/packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts index 68b0174cc..868f93759 100644 --- a/packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts +++ b/packages/taler-harness/src/integrationtests/test-libeufin-nexus-balance.ts @@ -114,4 +114,4 @@ export async function runLibeufinNexusBalanceTest(t: GlobalTestState) { } runLibeufinNexusBalanceTest.suites = ["libeufin"]; -runLibeufinNexusBalanceTest.excludeByDefault = true; +runLibeufinNexusBalanceTest.experimental = true; diff --git a/packages/taler-harness/src/integrationtests/test-revocation.ts b/packages/taler-harness/src/integrationtests/test-revocation.ts index 233780674..0cb6987ad 100644 --- a/packages/taler-harness/src/integrationtests/test-revocation.ts +++ b/packages/taler-harness/src/integrationtests/test-revocation.ts @@ -233,4 +233,4 @@ export async function runRevocationTest(t: GlobalTestState) { runRevocationTest.timeoutMs = 120000; runRevocationTest.suites = ["wallet"]; -runRevocationTest.excludeByDefault = true; +runRevocationTest.experimental = true; diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-huge.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-huge.ts index a9d544ee0..8777b19e2 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-huge.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-huge.ts @@ -114,4 +114,5 @@ export async function runWithdrawalHugeTest(t: GlobalTestState) { } runWithdrawalHugeTest.suites = ["wallet-perf"]; -runWithdrawalHugeTest.excludeByDefault = true; +// FIXME: Should not be "experimental" but "slow" or something similar. +runWithdrawalHugeTest.experimental = true; diff --git a/packages/taler-harness/src/integrationtests/testrunner.ts b/packages/taler-harness/src/integrationtests/testrunner.ts index 3a49cf73c..66bd87a59 100644 --- a/packages/taler-harness/src/integrationtests/testrunner.ts +++ b/packages/taler-harness/src/integrationtests/testrunner.ts @@ -14,39 +14,39 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { - CancellationToken, - Logger, - minimatch, - setGlobalLogLevelFromString, -} from "@gnu-taler/taler-util"; +import { CancellationToken, Logger, minimatch } from "@gnu-taler/taler-util"; import * as child_process from "child_process"; +import { spawnSync } from "child_process"; import * as fs from "fs"; import * as os from "os"; import * as path from "path"; import url from "url"; import { GlobalTestState, - runCommand, + TestRunResult, runTestWithState, shouldLingerInTest, - TestRunResult, } from "../harness/harness.js"; -import { spawnSync } from "child_process"; +import { getSharedTestDir } from "../harness/helpers.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 { runClaimLoopTest } from "./test-claim-loop.js"; import { runClauseSchnorrTest } from "./test-clause-schnorr.js"; import { runDenomUnofferedTest } from "./test-denom-unoffered.js"; import { runDepositTest } from "./test-deposit.js"; +import { runExchangeDepositTest } from "./test-exchange-deposit.js"; import { runExchangeManagementTest } from "./test-exchange-management.js"; +import { runExchangePurseTest } from "./test-exchange-purse.js"; import { runExchangeTimetravelTest } from "./test-exchange-timetravel.js"; import { runFeeRegressionTest } from "./test-fee-regression.js"; import { runForcedSelectionTest } from "./test-forced-selection.js"; +import { runKycTest } from "./test-kyc.js"; import { runLibeufinApiBankaccountTest } from "./test-libeufin-api-bankaccount.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 { runLibeufinApiFacadeTest } from "./test-libeufin-api-facade.js"; import { runLibeufinApiPermissionsTest } from "./test-libeufin-api-permissions.js"; import { runLibeufinApiSandboxCamtTest } from "./test-libeufin-api-sandbox-camt.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 { runLibeufinKeyrotationTest } from "./test-libeufin-keyrotation.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 { runLibeufinRefundTest } from "./test-libeufin-refund.js"; import { runLibeufinSandboxWireTransferCliTest } from "./test-libeufin-sandbox-wire-transfer-cli.js"; import { runLibeufinTutorialTest } from "./test-libeufin-tutorial.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 { runMerchantInstancesUrlsTest } from "./test-merchant-instances-urls.js"; +import { runMerchantInstancesTest } from "./test-merchant-instances.js"; import { runMerchantLongpollingTest } from "./test-merchant-longpolling.js"; import { runMerchantRefundApiTest } from "./test-merchant-refund-api.js"; import { runMerchantSpecPublicOrdersTest } from "./test-merchant-spec-public-orders.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 { runPaymentExpiredTest } from "./test-payment-expired.js"; import { runPaymentFaultTest } from "./test-payment-fault.js"; import { runPaymentForgettableTest } from "./test-payment-forgettable.js"; import { runPaymentIdempotencyTest } from "./test-payment-idempotency.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 { runPaymentZeroTest } from "./test-payment-zero.js"; +import { runPaymentTest } from "./test-payment.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 { runPeerToPeerPushTest } from "./test-peer-to-peer-push.js"; -import { runRefundTest } from "./test-refund.js"; import { runRefundAutoTest } from "./test-refund-auto.js"; import { runRefundGoneTest } from "./test-refund-gone.js"; import { runRefundIncrementalTest } from "./test-refund-incremental.js"; +import { runRefundTest } from "./test-refund.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 { runTimetravelWithdrawTest } from "./test-timetravel-withdraw.js"; import { runTippingTest } from "./test-tipping.js"; +import { runTermOfServiceFormatTest } from "./test-tos-format.js"; import { runWalletBackupBasicTest } from "./test-wallet-backup-basic.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 { runWalletNotificationsTest } from "./test-wallet-notifications.js"; import { runWallettestingTest } from "./test-wallettesting.js"; import { runWithdrawalAbortBankTest } from "./test-withdrawal-abort-bank.js"; import { runWithdrawalBankIntegratedTest } from "./test-withdrawal-bank-integrated.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 { runWalletBalanceTest } from "./test-wallet-balance.js"; -import { runPaymentTemplateTest } from "./test-payment-template.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"; +import { runWithdrawalHugeTest } from "./test-withdrawal-huge.js"; +import { runWithdrawalManualTest } from "./test-withdrawal-manual.js"; /** * Test runner. @@ -128,7 +122,6 @@ const logger = new Logger("testrunner.ts"); interface TestMainFunction { (t: GlobalTestState): Promise<void>; timeoutMs?: number; - excludeByDefault?: boolean; experimental?: boolean; suites?: string[]; } @@ -232,7 +225,6 @@ export interface TestRunSpec { export interface TestInfo { name: string; suites: string[]; - excludeByDefault: boolean; experimental: boolean; } @@ -337,19 +329,16 @@ export async function runTests(spec: TestRunSpec) { continue; } + if (testCase.experimental && !spec.includeExperimental) { + continue; + } + if (suites) { const ts = new Set(testCase.suites ?? []); const intersection = new Set([...suites].filter((x) => ts.has(x))); if (intersection.size === 0) { continue; } - } else { - if (testCase.excludeByDefault) { - continue; - } - if (testCase.experimental && !spec.includeExperimental) { - continue; - } } if (spec.dryRun) { @@ -525,7 +514,6 @@ export function getTestInfo(): TestInfo[] { return allTests.map((x) => ({ name: getTestName(x), suites: x.suites ?? [], - excludeByDefault: x.excludeByDefault ?? false, experimental: x.experimental ?? false, })); } |