Skip to content

Latest commit

 

History

History
83 lines (71 loc) · 2.68 KB

SETUP.md

File metadata and controls

83 lines (71 loc) · 2.68 KB

Installing the SFDX CLI Plugin

Step 1. Install Node

Node is required for the plugin to run. Download and install the macOS Installer (.pkg) from the Node JS download page.

Step 2. Install Yarn

Yarn is a package manager used by the plugin and can be installed using the following command.

sudo npm i yarn -g

Step 3. Clone the repository.

Clone the repository to your local development folder.

Step 4. Set environment variable(s)

Ensure that you have an environment variable REPO set to the project's parent folder. This is the directory where your development project(s) reside.

Set the variable as per the following example:

export REPO=/Users/yourusername/dev/

Step 5. Add a global config

For configuration values across all projects, create the file $HOME//plugin-config.json where metadirname is defined in src/globals.js An example is shown below.

{
    "proxySettings": {
        "httpProxyHost": "myproxy.myorg.com",
        "httpProxyPort": "8888"
    },
    "talendSettings": {
        "dataOrgUsername": "[email protected]",
        "jarDir": "$REPO/customjarsdirectory/",
        "jarDependenciesDir": "$REPO/customjarsdirectory/lib/",
        "projectDir": "data",
        "talendProjectName": "mytalendproject",
        "orgSetupDataClass": "zz6_scratch_admin",
        "soapApiVersion": "44.0",
        "uberJar": "talend.jar"
    },
    "restrictedOrgs": [
        "[email protected]",
        "[email protected]",
        "[email protected]"
    ]
}

Step 6. Add a local project config

For configuration specific to a single DX project, create the file /plugin-config.json in the project root, where metadirname is defined in src/globals.js.

See plugin-config-sample.json in the root of this project as an example. It can be split into global and local configs as needed.

Step 7. Link the plugin to SFDX.

Use the following command to complete the installation.

sfdx plugins:link <path to project>

Running Tests

Running unit tests

To run unit tests only, execute the following command.

yarn test

Running integration tests

These are longer-running tests that interact with modules and files external to the method under test. To execute the integration tests tets, run the following command.

IMPORTANT: Some integration tests will fail unless there is at least one connected sandbox and one active scratch org returned by force:org:list.

yarn integ

Running all tests

To run all unit and integration tests, execute the following command.

yarn alltests