Skip to content

Start an instance of the DB server to avoid having each CLI command do this over and over #201

@AlCalzone

Description

@AlCalzone

Initial setup of the dev-server is pretty slow because every CLI command (while js-controller isn't running) starts two DB instances, connects to them, performs its command and shuts down the DBs again. It would be much faster to spin up the DB manually, perform all CLI commands (or edit objects directly) and then shut down the DBs before starting the controller.

Here's an example how @iobroker/testing does it:
https://github.com/ioBroker/testing/blob/c30c06c228285811aa05cf58d731493b8565729d/src/tests/integration/lib/dbConnection.ts#L122-L135

https://github.com/ioBroker/testing/blob/c30c06c228285811aa05cf58d731493b8565729d/src/tests/integration/lib/harness.ts#L106-L108

https://github.com/ioBroker/testing/blob/c30c06c228285811aa05cf58d731493b8565729d/src/tests/integration/lib/harness.ts#L265-L275

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions