Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 04e69ea
Author: Jeromy Cannon <[email protected]>
Date:   Thu Dec 26 13:22:26 2024 +0000

    Squashed commit of the following:

    commit 5ab8bfdffd3c5d1932e7ed6a61e736d7216b4248
    Author: Jeromy Cannon <[email protected]>
    Date:   Thu Dec 26 13:15:50 2024 +0000

        got `solo init` to work.

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit 8bcf11c95ca5e310b177ed00be3a58a24fdbbac6
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 22:00:08 2024 +0000

        remove eslint errors

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit de0046a370e14582500ce25e412cb8c8fb7158a1
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 21:59:51 2024 +0000

        removed isolated modules, it seems to be adding js files and dist folders in incorrect locations

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit 4909cbdcf289ba35d68620bab88bb73815f5ecc2
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 21:59:23 2024 +0000

        change eslint back, if we need to override, we can use @ignore tags and document

        Signed-off-by: Jeromy Cannon <[email protected]>

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 8c16717
Author: Jeromy Cannon <[email protected]>
Date:   Thu Dec 26 13:24:23 2024 +0000

    Squashed commit of the following:

    commit 294aa0a
    Author: Ivo Yankov <[email protected]>
    Date:   Thu Dec 26 10:36:26 2024 +0200

        chore: add build step to unit test CI

        Signed-off-by: Ivo Yankov <[email protected]>

    commit f67071c
    Author: Ivo Yankov <[email protected]>
    Date:   Thu Dec 26 10:26:14 2024 +0200

        fix: update mocha scripts in package.json

        Signed-off-by: Ivo Yankov <[email protected]>

    commit be6d88e
    Author: Ivo Yankov <[email protected]>
    Date:   Thu Dec 26 09:54:26 2024 +0200

        chore: run formatter

        Signed-off-by: Ivo Yankov <[email protected]>

    commit c0b8b16
    Author: Ivo Yankov <[email protected]>
    Date:   Thu Dec 26 09:52:14 2024 +0200

        fix: various unit tests

        Signed-off-by: Ivo Yankov <[email protected]>

    commit 5a05b87
    Author: Ivo Yankov <[email protected]>
    Date:   Thu Dec 26 08:13:22 2024 +0200

        fix: injections in tests

        Signed-off-by: Ivo Yankov <[email protected]>

    commit 6178ccf
    Merge: 24269fe c3a9691
    Author: Ivo Yankov <[email protected]>
    Date:   Tue Dec 24 15:39:32 2024 +0200

        Merge remote-tracking branch 'origin/00822-implement-inversion-of-control-2' into 00822-implement-inversion-of-control-2

        # Conflicts:
        #	src/core/account_manager.ts
        #	src/core/config/local_config.ts
        #	src/core/config_manager.ts
        #	src/core/lease/lease_manager.ts
        #	src/core/profile_manager.ts
        #	src/index.ts
        #	test/setup.ts
        #	test/test_container.ts
        #	test/test_util.ts
        #	test/unit/commands/base.test.ts
        #	test/unit/commands/context.test.ts
        #	test/unit/commands/network.test.ts
        #	test/unit/core/platform_installer.test.ts
        #	test/unit/core/profile_manager.test.ts

    commit c3a9691
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 20:35:20 2024 +0000

        add reflect metadata back

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit dd13b95
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 20:28:06 2024 +0000

        fixed eslint errors from `npm run check`

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit 6d7522c
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 20:14:08 2024 +0000

        npm run format

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit f323ca7
    Author: Jeromy Cannon <[email protected]>
    Date:   Mon Dec 23 19:59:26 2024 +0000

        Squashed commit of the following:

        commit 24269fe
        Author: Ivo Yankov <[email protected]>
        Date:   Fri Dec 20 11:03:26 2024 +0200

            wip: attempting to fix tests

            Signed-off-by: Ivo Yankov <[email protected]>

        commit 7698f16
        Author: Ivo Yankov <[email protected]>
        Date:   Thu Dec 19 15:41:38 2024 +0200

            chore: format

            Signed-off-by: Ivo Yankov <[email protected]>

        commit 507a081
        Author: Ivo Yankov <[email protected]>
        Date:   Thu Dec 19 14:53:36 2024 +0200

            feat: implement IOC in core classes

            Signed-off-by: Ivo Yankov <[email protected]>

        commit c582f12
        Author: Ivo Yankov <[email protected]>
        Date:   Wed Dec 18 17:32:22 2024 +0200

            wip: refactoring dependencies

            Signed-off-by: Ivo Yankov <[email protected]>

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit 1b9b7e6
    Author: Jan Milenkov <[email protected]>
    Date:   Mon Dec 23 21:22:56 2024 +0200

        feat: dynamically construct the genesis-network.json and add it to the values file to be used during network deploy (#982)

        Signed-off-by: Jeromy Cannon <[email protected]>
        Co-authored-by: Jeromy Cannon <[email protected]>

    commit 3c3673a
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Mon Dec 23 08:12:58 2024 -0600

        chore(deps): bump jfrog/setup-jfrog-cli from 4.5.2 to 4.5.3 (#1015)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit 299cd85
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Mon Dec 23 08:12:30 2024 -0600

        chore(deps): bump helm/kind-action from 1.11.0 to 1.12.0 (#1014)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit 1d57fb8
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Mon Dec 23 07:47:07 2024 -0600

        chore(deps): bump chalk from 5.4.0 to 5.4.1 (#1013)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit a4e5cd8
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Mon Dec 23 07:26:24 2024 -0600

        chore(deps): bump inquirer from 12.2.0 to 12.3.0 (#1012)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit 7a69623
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Sun Dec 22 19:20:53 2024 +0000

        chore(deps-dev): bump eslint-plugin-n from 17.15.0 to 17.15.1 (#1011)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit 7bb0e99
    Author: Jeromy Cannon <[email protected]>
    Date:   Sun Dec 22 07:31:54 2024 +0000

        fix: refactored Taskfiles, fixed bugs with taskfile, lease interval, sdk node client connection, and commands missing quiet flag (#978)

        Signed-off-by: Jeromy Cannon <[email protected]>

    commit 861c579
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Thu Dec 19 11:06:35 2024 -0600

        chore(deps-dev): bump globals from 15.13.0 to 15.14.0 (#1007)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit e80bda8
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Thu Dec 19 11:06:22 2024 -0600

        chore(deps): bump chalk from 5.3.0 to 5.4.0 (#1008)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit f4b49aa
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Thu Dec 19 10:47:50 2024 -0600

        chore(deps): bump @hashgraph/sdk from 2.55.1 to 2.56.0 (#1009)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit c9711c5
    Author: Ivo Yankov <[email protected]>
    Date:   Thu Dec 19 18:47:03 2024 +0200

        feat: update `solo context connect` to connect to single remote cluster (#993)

        Signed-off-by: Ivo Yankov <[email protected]>

    commit 043efcf
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Wed Dec 18 16:56:19 2024 -0600

        chore(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0 (#1002)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    commit 8115945
    Author: Pranali Deshmukh <[email protected]>
    Date:   Thu Dec 19 00:55:58 2024 +0200

        docs(README): Updated the "Install Solo" section. (#1004)

        Signed-off-by: Pranali Deshmukh <[email protected]>

    commit 01ed969
    Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Date:   Wed Dec 18 11:19:09 2024 -0600

        chore(deps): bump actions/setup-java from 4.5.0 to 4.6.0 (#1003)

        Signed-off-by: dependabot[bot] <[email protected]>
        Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

    Signed-off-by: Jeromy Cannon <[email protected]>

commit 24269fe
Author: Ivo Yankov <[email protected]>
Date:   Fri Dec 20 11:03:26 2024 +0200

    wip: attempting to fix tests

    Signed-off-by: Ivo Yankov <[email protected]>

commit 7698f16
Author: Ivo Yankov <[email protected]>
Date:   Thu Dec 19 15:41:38 2024 +0200

    chore: format

    Signed-off-by: Ivo Yankov <[email protected]>

commit 507a081
Author: Ivo Yankov <[email protected]>
Date:   Thu Dec 19 14:53:36 2024 +0200

    feat: implement IOC in core classes

    Signed-off-by: Ivo Yankov <[email protected]>

commit c582f12
Author: Ivo Yankov <[email protected]>
Date:   Wed Dec 18 17:32:22 2024 +0200

    wip: refactoring dependencies

    Signed-off-by: Ivo Yankov <[email protected]>

Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Dec 26, 2024
1 parent 1b9b7e6 commit 7d988e3
Show file tree
Hide file tree
Showing 52 changed files with 581 additions and 382 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/zxc-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
id: npm-deps
run: npm ci

- name: Compile Project
run: npm run build

- name: Run Unit Tests
run: npm test

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NOTES:
## Customizing the examples

* take a look at the Taskfile.yml sitting in the subdirectory for the deployment you want to run
* make sure your cluster can handle the number in SOLO_NETWORK_SIZE, if not, then you will have to update that and make it match the number of nodes in the `init-containers-values.yaml`: `hedera.nodes[]`
* make sure your cluster can handle the number in SOLO\_NETWORK\_SIZE, if not, then you will have to update that and make it match the number of nodes in the `init-containers-values.yaml`: `hedera.nodes[]`
* take a look at the `init-containers-values.yaml` file and make sure the values are correct for your deployment with special attention to:
* resources
* nodeSelector
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
"access": "public"
},
"scripts": {
"test": "cross-env MOCHA_SUITE_NAME=\"Unit Tests\" c8 --report-dir='coverage/unit' mocha 'test/unit/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-mathex": "cross-env MOCHA_SUITE_NAME=\"MathEx Unit Tests\" c8 --report-dir='coverage/unit-mathex' mocha 'test/unit/**/math_ex*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-e2e-all": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" c8 --report-dir='coverage/e2e-all' mocha 'test/e2e/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-all.xml",
"test-e2e-integration": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Integration Tests\" c8 --report-dir='coverage/e2e-integration' mocha 'test/e2e/integration/**/*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
"test-e2e-leases": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Lease Tests\" c8 --report-dir='coverage/e2e-leases' mocha 'test/e2e/integration/core/lease*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
"test-e2e-standard": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" c8 --report-dir='coverage/e2e-standard' mocha 'test/e2e/**/*.ts' --ignore 'test/unit/**/*.ts' --ignore 'test/e2e/integration/**/*.ts' --ignore 'test/e2e/commands/mirror_node*.ts' --ignore 'test/e2e/commands/node*.ts' --ignore 'test/e2e/commands/separate_node*.ts' --ignore 'test/e2e/commands/relay*.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-standard.xml --timeout 30000",
"test-e2e-mirror-node": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Mirror Node Tests\" c8 --report-dir='coverage/e2e-mirror-node' mocha 'test/e2e/commands/mirror_node.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-mirror-node.xml",
"test-e2e-node-pem-stop": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Stop Tests\" c8 --report-dir='coverage/e2e-node-pem-stop' mocha 'test/e2e/commands/node_pem_stop.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-stop.xml",
"test-e2e-node-pem-kill": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Kill Tests\" c8 --report-dir='coverage/e2e-node-pem-kill' mocha 'test/e2e/commands/node_pem_kill.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-kill.xml",
"test-e2e-node-local-hedera": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local Hedera Tests\" c8 --report-dir='coverage/e2e-node-local-hedera' mocha 'test/e2e/commands/node_local_hedera.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-hedera.xml",
"test-e2e-node-local-ptt": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local PTT Tests\" c8 --report-dir='coverage/e2e-node-local-ptt' mocha 'test/e2e/commands/node_local_ptt.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-ptt.xml",
"test-e2e-node-add": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Tests\" c8 --report-dir='coverage/e2e-node-add' mocha 'test/e2e/commands/node_add.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add.xml",
"test-e2e-node-add-local": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Local Tests\" c8 --report-dir='coverage/e2e-node-add-local' mocha 'test/e2e/commands/node_add_local.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-local.xml",
"test-e2e-node-add-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-add-separate-commands' mocha 'test/e2e/commands/separate_node_add*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-separate-commands.xml",
"test-e2e-node-update": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update Tests\" c8 --report-dir='coverage/e2e-node-update' mocha 'test/e2e/commands/node_update*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update.xml",
"test-e2e-node-update-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-update-separate-commands' mocha 'test/e2e/commands/separate_node_update.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update-separate-commands.xml",
"test-e2e-node-delete": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete Tests\" c8 --report-dir='coverage/e2e-node-delete' mocha 'test/e2e/commands/node_delete*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete.xml",
"test-e2e-node-delete-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-delete-separate-commands' mocha 'test/e2e/commands/separate_node_delete*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete-separate-commands.xml",
"test-e2e-node-upgrade": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Upgrade Tests\" c8 --report-dir='coverage/e2e-node-upgrade' mocha 'test/e2e/commands/node_upgrade*.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-upgrade.xml",
"test-e2e-relay": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Relay Tests\" c8 --report-dir='coverage/e2e-relay' mocha 'test/e2e/commands/relay.test.ts' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-relay.xml",
"solo-test": "tsx --no-deprecation --no-warnings solo.ts",
"test": "cross-env MOCHA_SUITE_NAME=\"Unit Tests\" c8 --report-dir='coverage/unit' mocha 'dist/test/unit/**/*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-mathex": "cross-env MOCHA_SUITE_NAME=\"MathEx Unit Tests\" c8 --report-dir='coverage/unit-mathex' mocha 'dist/test/unit/**/math_ex*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit.xml",
"test-e2e-all": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E All Tests\" c8 --report-dir='coverage/e2e-all' mocha 'dist/test/e2e/**/*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-all.xml",
"test-e2e-integration": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Integration Tests\" c8 --report-dir='coverage/e2e-integration' mocha 'dist/test/e2e/integration/**/*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
"test-e2e-leases": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Lease Tests\" c8 --report-dir='coverage/e2e-leases' mocha 'dist/test/e2e/integration/core/lease*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-integration.xml",
"test-e2e-standard": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Standard Tests\" c8 --report-dir='coverage/e2e-standard' mocha 'dist/test/e2e/**/*.js' --ignore 'test/unit/**/*.js' --ignore 'test/e2e/integration/**/*.js' --ignore 'test/e2e/commands/mirror_node*.js' --ignore 'test/e2e/commands/node*.js' --ignore 'test/e2e/commands/separate_node*.js' --ignore 'test/e2e/commands/relay*.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-standard.xml --timeout 30000",
"test-e2e-mirror-node": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Mirror Node Tests\" c8 --report-dir='coverage/e2e-mirror-node' mocha 'dist/test/e2e/commands/mirror_node.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-mirror-node.xml",
"test-e2e-node-pem-stop": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Stop Tests\" c8 --report-dir='coverage/e2e-node-pem-stop' mocha 'dist/test/e2e/commands/node_pem_stop.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-stop.xml",
"test-e2e-node-pem-kill": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node PEM Kill Tests\" c8 --report-dir='coverage/e2e-node-pem-kill' mocha 'dist/test/e2e/commands/node_pem_kill.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-pem-kill.xml",
"test-e2e-node-local-hedera": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local Hedera Tests\" c8 --report-dir='coverage/e2e-node-local-hedera' mocha 'dist/test/e2e/commands/node_local_hedera.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-hedera.xml",
"test-e2e-node-local-ptt": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Local PTT Tests\" c8 --report-dir='coverage/e2e-node-local-ptt' mocha 'dist/test/e2e/commands/node_local_ptt.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-local-ptt.xml",
"test-e2e-node-add": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Tests\" c8 --report-dir='coverage/e2e-node-add' mocha 'dist/test/e2e/commands/node_add.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add.xml",
"test-e2e-node-add-local": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add Local Tests\" c8 --report-dir='coverage/e2e-node-add-local' mocha 'dist/test/e2e/commands/node_add_local.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-local.xml",
"test-e2e-node-add-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Add - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-add-separate-commands' mocha 'dist/test/e2e/commands/separate_node_add*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-add-separate-commands.xml",
"test-e2e-node-update": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update Tests\" c8 --report-dir='coverage/e2e-node-update' mocha 'dist/test/e2e/commands/node_update*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update.xml",
"test-e2e-node-update-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Update - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-update-separate-commands' mocha 'dist/test/e2e/commands/separate_node_update.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-update-separate-commands.xml",
"test-e2e-node-delete": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete Tests\" c8 --report-dir='coverage/e2e-node-delete' mocha 'dist/test/e2e/commands/node_delete*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete.xml",
"test-e2e-node-delete-separate-commands": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Delete - Separate commands Tests\" c8 --report-dir='coverage/e2e-node-delete-separate-commands' mocha 'dist/test/e2e/commands/separate_node_delete*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-delete-separate-commands.xml",
"test-e2e-node-upgrade": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Node Upgrade Tests\" c8 --report-dir='coverage/e2e-node-upgrade' mocha 'dist/test/e2e/commands/node_upgrade*.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-node-upgrade.xml",
"test-e2e-relay": "cross-env MOCHA_SUITE_NAME=\"Mocha E2E Relay Tests\" c8 --report-dir='coverage/e2e-relay' mocha 'dist/test/e2e/commands/relay.test.js' --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit-e2e-relay.xml",
"solo-test": "tsx --no-deprecation --no-warnings solo.js",
"solo": "node --no-deprecation --no-warnings dist/solo.js",
"check": "remark . --quiet --frail && eslint . && tsc && madge --circular src/* && cd docs; jsdoc -c jsdoc.conf.json",
"format": "remark . --quiet --frail --output && eslint --fix . && tsc && madge --circular src/*",
Expand Down Expand Up @@ -71,6 +71,7 @@
"stream-buffers": "^3.0.3",
"tar": "^7.4.3",
"tsx": "^4.19.2",
"tsyringe-neo": "^5.1.0",
"uuid": "^11.0.3",
"validator": "^13.12.0",
"winston": "^3.17.0",
Expand Down
5 changes: 2 additions & 3 deletions src/commands/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export abstract class BaseCommand extends ShellRunner {
protected readonly remoteConfigManager: RemoteConfigManager;

constructor(opts: Opts) {
if (!opts || !opts.logger) throw new Error('An instance of core/SoloLogger is required');
// if (!opts || !opts.logger) throw new Error('An instance of core/SoloLogger is required');
if (!opts || !opts.helm) throw new Error('An instance of core/Helm is required');
if (!opts || !opts.k8) throw new Error('An instance of core/K8 is required');
if (!opts || !opts.chartManager) throw new Error('An instance of core/ChartManager is required');
Expand All @@ -57,8 +57,7 @@ export abstract class BaseCommand extends ShellRunner {
if (!opts || !opts.localConfig) throw new Error('An instance of core/LocalConfig is required');
if (!opts || !opts.remoteConfigManager)
throw new Error('An instance of core/config/RemoteConfigManager is required');

super(opts.logger);
super();

this.helm = opts.helm;
this.k8 = opts.k8;
Expand Down
15 changes: 8 additions & 7 deletions src/core/account_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ import type {NetworkNodeServices} from './network_node_services.js';
import {NetworkNodeServicesBuilder} from './network_node_services.js';
import path from 'path';

import {type SoloLogger} from './logging.js';
import {type K8} from './k8.js';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
import {SoloLogger} from './logging.js';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
import {K8} from './k8.js';
import {type AccountIdWithKeyPairObject, type ExtendedNetServer} from '../types/index.js';
import {type NodeAlias, type PodName, type SdkNetworkEndpoint} from '../types/aliases.js';
import {IGNORED_NODE_ACCOUNT_ID} from './constants.js';
import {sleep} from './helpers.js';
import {Duration} from './time/duration.js';
import {autoInjectable} from 'tsyringe-neo';

const REASON_FAILED_TO_GET_KEYS = 'failed to get keys for accountId';
const REASON_SKIPPED = 'skipped since it does not have a genesis key';
Expand All @@ -55,17 +58,15 @@ const REASON_FAILED_TO_CREATE_K8S_S_KEY = 'failed to create k8s scrt key';
const FULFILLED = 'fulfilled';
const REJECTED = 'rejected';

@autoInjectable()
export class AccountManager {
private _portForwards: ExtendedNetServer[];
public _nodeClient: Client | null;

constructor(
private readonly logger: SoloLogger,
private readonly k8: K8,
private readonly logger?: SoloLogger,
private readonly k8?: K8,
) {
if (!logger) throw new Error('An instance of core/SoloLogger is required');
if (!k8) throw new Error('An instance of core/K8 is required');

this._portForwards = [];
this._nodeClient = null;
}
Expand Down
23 changes: 12 additions & 11 deletions src/core/certificate_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,26 @@ import fs from 'fs';
import {Templates} from './templates.js';
import {GrpcProxyTlsEnums} from './enumerations.js';

import type {ConfigManager} from './config_manager.js';
import type {K8} from './k8.js';
import type {SoloLogger} from './logging.js';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
import {ConfigManager} from './config_manager.js';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
import {K8} from './k8.js';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports -- required for dependency injection
import {SoloLogger} from './logging.js';
import type {ListrTaskWrapper} from 'listr2';
import type {NodeAlias} from '../types/aliases.js';
import {autoInjectable} from 'tsyringe-neo';

/**
* Used to handle interactions with certificates data and inject it into the K8s cluster secrets
*/
@autoInjectable()
export class CertificateManager {
constructor(
private readonly k8: K8,
private readonly logger: SoloLogger,
private readonly configManager: ConfigManager,
) {
if (!k8) throw new MissingArgumentError('an instance of core/K8 is required');
if (!logger) throw new MissingArgumentError('an instance of core/SoloLogger is required');
if (!configManager) throw new MissingArgumentError('an instance of core/ConfigManager is required');
}
private readonly k8?: K8,
private readonly logger?: SoloLogger,
private readonly configManager?: ConfigManager,
) {}

/**
* Reads the certificate and key and build the secret with the appropriate structure
Expand Down
Loading

0 comments on commit 7d988e3

Please sign in to comment.