From ce2f01a045fbbf6a507ea1736c904a13766359f0 Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Fri, 22 Dec 2023 10:03:07 -0500 Subject: [PATCH] ci: manual migration of test- strings --- .eslintrc.cjs | 2 +- .github/workflows/test-all-packages.yml | 8 +-- package.json | 3 +- packages/ERTP/package.json | 6 +- .../.ava-integration-test.config.js | 2 +- .../{test-workflow.js => workflow.test.js} | 0 packages/xsnap/src/avaXS.js | 2 +- packages/zoe/package.json | 62 +++++++++---------- 8 files changed, 43 insertions(+), 42 deletions(-) rename packages/agoric-cli/integration-tests/{test-workflow.js => workflow.test.js} (100%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 4bcb2b191b4..d54d1466f19 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -127,7 +127,7 @@ module.exports = { { // These tests use EV() instead of E(), which are easy to confuse. // Help by erroring when E() packages are imported. - files: ['packages/boot/test/**/test-*'], + files: ['packages/boot/test/**/*.test.*'], rules: { 'no-restricted-imports': [ 'error', diff --git a/.github/workflows/test-all-packages.yml b/.github/workflows/test-all-packages.yml index 6b1d17313a4..51e109e4c7e 100644 --- a/.github/workflows/test-all-packages.yml +++ b/.github/workflows/test-all-packages.yml @@ -498,7 +498,7 @@ jobs: # END-TEST-BOILERPLATE - name: yarn test (SwingSet) if: (success() || failure()) - run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[A-Da-d]*.js' | $TEST_COLLECT + run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[A-Da-d]*' | $TEST_COLLECT - name: notify on failure if: failure() && github.event_name != 'pull_request' uses: ./.github/actions/notify-status @@ -540,7 +540,7 @@ jobs: # END-TEST-BOILERPLATE - name: yarn test (SwingSet) if: (success() || failure()) - run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[E-Ie-i]*.js' | $TEST_COLLECT + run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[E-Ie-i]*' | $TEST_COLLECT - name: yarn test (xsnap-lockdown) if: (success() || failure()) run: cd packages/xsnap-lockdown && yarn ${{ steps.vars.outputs.test }} | $TEST_COLLECT @@ -591,7 +591,7 @@ jobs: # END-TEST-BOILERPLATE - name: yarn test (SwingSet) if: (success() || failure()) - run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[J-Rj-r]*.js' | $TEST_COLLECT + run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[J-Rj-r]*' | $TEST_COLLECT - name: notify on failure if: failure() && github.event_name != 'pull_request' uses: ./.github/actions/notify-status @@ -633,7 +633,7 @@ jobs: - name: yarn test (SwingSet) if: (success() || failure()) - run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/test-[S-Zs-z0-9]*.js' | $TEST_COLLECT + run: cd packages/SwingSet && yarn ${{ steps.vars.outputs.test }} 'test/**/[S-Zs-z0-9.test]*.js' | $TEST_COLLECT - name: notify on failure if: failure() && github.event_name != 'pull_request' uses: ./.github/actions/notify-status diff --git a/package.json b/package.json index 8aa07223b4a..cf75641714a 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,8 @@ }, "ava": { "files": [ - "packages/*/test/**/test-*.ts" + "packages/*/test/**/test-*.*", + "packages/*/test/**/*.test.*" ], "timeout": "30m" }, diff --git a/packages/ERTP/package.json b/packages/ERTP/package.json index 0dc951e2e1d..7274530096e 100644 --- a/packages/ERTP/package.json +++ b/packages/ERTP/package.json @@ -68,9 +68,9 @@ "exclude": [ "swingsetTests", "# fast-check unsupported", - "test/unitTests/test-amountProperties.js", - "test/unitTests/test-inputValidation.js", - "test/unitTests/test-issuerObj.js" + "test/unitTests/amountProperties.test.js", + "test/unitTests/inputValidation.test.js", + "test/unitTests/issuerObj.test.js" ] }, "ava": { diff --git a/packages/agoric-cli/.ava-integration-test.config.js b/packages/agoric-cli/.ava-integration-test.config.js index e93a291ba18..ea6d3151368 100644 --- a/packages/agoric-cli/.ava-integration-test.config.js +++ b/packages/agoric-cli/.ava-integration-test.config.js @@ -1,7 +1,7 @@ // @jessie-check export default { - files: ['integration-tests/test-workflow.js'], + files: ['integration-tests/*.test.*'], timeout: '10m', workerThreads: false, }; diff --git a/packages/agoric-cli/integration-tests/test-workflow.js b/packages/agoric-cli/integration-tests/workflow.test.js similarity index 100% rename from packages/agoric-cli/integration-tests/test-workflow.js rename to packages/agoric-cli/integration-tests/workflow.test.js diff --git a/packages/xsnap/src/avaXS.js b/packages/xsnap/src/avaXS.js index e3962fcd311..b4ea009f04b 100644 --- a/packages/xsnap/src/avaXS.js +++ b/packages/xsnap/src/avaXS.js @@ -3,7 +3,7 @@ Usage: - node avaXS.js [--debug] test-*.js + node avaXS.js [--debug] *.test.js */ diff --git a/packages/zoe/package.json b/packages/zoe/package.json index 6057ce99442..8a1f4a44528 100644 --- a/packages/zoe/package.json +++ b/packages/zoe/package.json @@ -87,41 +87,41 @@ "exclude": [ "# path/url/import.meta stuff", "unitTests/contracts/", - "test/swingsetTests/privateArgs/test-privateArgs.js", - "test/swingsetTests/brokenContracts/test-crashingContract.js", - "test/swingsetTests/offerArgs/test-offerArgs.js", - "test/swingsetTests/makeKind/test-makeKind.js", - "test/swingsetTests/zoe/test-zoe.js", - "test/swingsetTests/runMint/test-runMint.js", - "test/unitTests/test-zoe.js", - "test/unitTests/test-scriptedOracle.js", - "test/unitTests/test-makeKind.js", - "test/unitTests/test-instanceStorage.js", - "test/unitTests/contractSupport/test-depositTo.js", - "test/unitTests/contractSupport/test-withdrawFrom.js", - "test/unitTests/contractSupport/test-offerTo.js", - "test/unitTests/zcf/test-zcfSeat.js", - "test/unitTests/zcf/test-zcfSeat-exit.js", + "test/swingsetTests/privateArgs/privateArgs.test.js", + "test/swingsetTests/brokenContracts/crashingContract.test.js", + "test/swingsetTests/offerArgs/offerArgs.test.js", + "test/swingsetTests/makeKind/makeKind.test.js", + "test/swingsetTests/zoe/zoe.test.js", + "test/swingsetTests/runMint/runMint.test.js", + "test/unitTests/zoe.test.js", + "test/unitTests/scriptedOracle.test.js", + "test/unitTests/makeKind.test.js", + "test/unitTests/instanceStorage.test.js", + "test/unitTests/contractSupport/depositTo.test.js", + "test/unitTests/contractSupport/withdrawFrom.test.js", + "test/unitTests/contractSupport/offerTo.test.js", + "test/unitTests/zcf/zcfSeat.test.js", + "test/unitTests/zcf/zcfSeat-exit.test.js", "test/unitTests/zcf/setupZcfTest.js", - "test/unitTests/zcf/test-feeMintAccess.js", + "test/unitTests/zcf/feeMintAccess.test.js", "# import.meta.url by way of setupZcfTest", - "test/unitTests/test-zoe.js", - "test/unitTests/test-zoe-startInstance.js", - "test/unitTests/test-blockedOffers.js", - "test/unitTests/zcf/test-reallocate-empty.js", - "test/unitTests/zcf/test-zoeHelpersWZcf.js", - "test/unitTests/zcf/test-reallocateForZCFMint.js", - "test/unitTests/zcf/test-atomicRearrange.js", - "test/unitTests/zcf/test-zcf.js", - "test/unitTests/zcf/test-allStagedSeatsUsed.js", + "test/unitTests/zoe.test.js", + "test/unitTests/zoe-startInstance.test.js", + "test/unitTests/blockedOffers.test.js", + "test/unitTests/zcf/reallocate-empty.test.js", + "test/unitTests/zcf/zoeHelpersWZcf.test.js", + "test/unitTests/zcf/reallocateForZCFMint.test.js", + "test/unitTests/zcf/atomicRearrange.test.js", + "test/unitTests/zcf/zcf.test.js", + "test/unitTests/zcf/allStagedSeatsUsed.test.js", "# ManualTimer.setWakeup: no function", - "test/unitTests/test-fakePriceAuthority.js", - "test/unitTests/test-manualTimer.js", + "test/unitTests/fakePriceAuthority.test.js", + "test/unitTests/manualTimer.test.js", "# hangs", - "test-makeKind.js", - "test/unitTests/test-scriptedOracle.js", - "test/unitTests/test-zoe.js", - "test/unitTests/zcf/test-allStagedSeatsUsed.js", + "makeKind.test.js", + "test/unitTests/scriptedOracle.test.js", + "test/unitTests/zoe.test.js", + "test/unitTests/zcf/allStagedSeatsUsed.test.js", "# We use SWINGSET_WORKER_TYPE=xs ava to run these...", "swingsetTests" ]