Skip to content

Commit

Permalink
test(connector-fabric): jestify all remaining test cases
Browse files Browse the repository at this point in the history
Primary Changes
----------------
1. Jestified remaining tests for the connector-fabric plugin,
excluding add-orgs.test.ts (currently skipped).
2. Removed the tests from taprc and jest.config.js

Fixes #3547

Signed-off-by: adrianbatuto <adrian.batuto@accenture.com>
  • Loading branch information
adrianbatuto committed Oct 29, 2024
1 parent 891a705 commit ed138ee
Show file tree
Hide file tree
Showing 13 changed files with 1,383 additions and 1,980 deletions.
363 changes: 0 additions & 363 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1490,369 +1490,6 @@ jobs:
name: coverage-reports-28
path: ./code-coverage-ts/**/

plc-fabric-1:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
continue-on-error: false
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts

plc-fabric-2:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts

plc-fabric-4:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts

plc-fabric-5:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts

plc-fabric-6:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/identity-internal-crypto-utils.test.ts

plc-fabric-7:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts

plc-fabric-8:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts

plc-fabric-9:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts

plc-fabric-10:
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
continue-on-error: false
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts

plc-fabric-11:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn ts-node ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts

plc-fabric-12:
continue-on-error: false
needs:
- build-dev
- compute_changed_packages
if: needs.compute_changed_packages.outputs.plugin-ledger-connector-fabric-changed == 'true'
env:
CACTI_NPM_PACKAGE_NAME: "@hyperledger/cactus-plugin-ledger-connector-fabric"
HFC_LOGGING: '{"debug":"console","info":"console","warn": "console","error":"console"}'
FULL_BUILD_DISABLED: true
JEST_TEST_PATTERN: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts
JEST_TEST_RUNNER_DISABLED: true
TAPE_TEST_PATTERN: ""
TAPE_TEST_RUNNER_DISABLED: true
runs-on: ubuntu-22.04
steps:
- name: Use Node.js ${{ env.NODEJS_VERSION }}
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ env.NODEJS_VERSION }}
- uses: actions/checkout@v4.1.7

- id: yarn-cache
name: Restore Yarn Cache
uses: actions/cache@v4.0.2
with:
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
path: ./.yarn/
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
- run: npm run configure
- run: yarn jest ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts

cplc-iroha2:
continue-on-error: false
needs:
Expand Down
11 changes: 1 addition & 10 deletions .taprc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ jobs: 1
timeout: 3600
ts: true
files:
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/obtain-profiles.test.ts
- ./packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts
- ./packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-factory-keychain.test.ts
- ./packages/cactus-plugin-keychain-azure-kv/src/test/typescript/integration/plugin-keychain-azure-kv.test.ts
Expand All @@ -28,14 +26,7 @@ files:
- ./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-past-logs-endpoint.test.ts
- ./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-transaction-endpoint.test.ts
- ./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/get-block-endpoint.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts
- ./packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/unit/identity-internal-crypto-utils.test.ts
- ./packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-validator-besu/v21-sign-transaction-endpoint.test.ts
- ./packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts
- ./packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts
- ./packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts
Expand Down
Loading

0 comments on commit ed138ee

Please sign in to comment.