github.com/ablease/cli@v6.37.1-0.20180613014814-3adbb7d7fb19+incompatible/integration/README.md (about) 1 # CLI Integration Tests 2 These are high-level tests for the CLI that make assertions about the behavior of the `cf` binary. 3 4 These tests require that a `cf` binary built from the latest source is available in your `PATH`. 5 6 ## Explanation of test suites 7 - `global` suite is for tests that affect an entire CF instance. *These tests do not run in parallel.* 8 - `isolated` suite is for tests that are stand alone and do not affect each other. They are meant to run in their own organization and space, and will not affect system state. This is the most common type of integration tests. 9 - `push` suite is for tests related to the `cf push` command only. 10 - `experimental` suite is for tests that require the cf experimental flag to be set and/or an experimental feature for the CF CLI. 11 - `plugin` suite is for tests that surround the CF CLI plugin framework. *These tests do not run in parallel.* 12 13 ## How to run 14 These tests rely on [ginkgo](https://github.com/onsi/ginkgo) to be installed. 15 16 Run command for the `isolated`, `push` and `experimental` suite: 17 ``` 18 ginkgo -p -r -randomizeAllSpecs -slowSpecThreshold=120 integration/isolated integration/push integration/experimental 19 ``` 20 21 Run command for the `global` and `plugin` suites: 22 ``` 23 ginkgo -r -randomizeAllSpecs -slowSpecThreshold=120 integration/global integration/plugin 24 ``` 25 26 ### Customizations (based on environment variables) 27 28 - `CF_INT_API` - Sets the CF API URL these tests will be using. Will default to `api.bosh-lite.com` if not set. 29 - `SKIP_SSL_VALIDATION` - If true, will skip SSL Validation. Will default `--skip-ssl-validation` if not set. 30 - `CF_INT_USERNAME` - The CF Administrator username. Will default to `admin` if not set. 31 - `CF_INT_PASSWORD` - The CF Administrator password. Will default to `admin` if not set. 32 - `CF_INT_DOCKER_IMAGE` - A private docker image used for the docker authentication tests. 33 - `CF_INT_DOCKER_USERNAME` - The username for the private docker registry for `CF_INT_DOCKER_IMAGE`. 34 - `CF_INT_DOCKER_PASSWORD` - The password for `CF_INT_DOCKER_USERNAME`. 35 - `CF_INT_CLIENT_ID` - the ID for the integration client credentials identity. 36 - `CF_INT_CLIENT_SECRET` - the secret for the integration client credentials identity. 37 - `CF_CLI_EXPERIMENTAL` - Will enable both experimental functionality of the CF CLI and tests for that functionality. Will default to `false` if not set. 38 39 ### The test suite does not cleanup after itself! 40 In order to focus on clean test code and performance of each test, we have decided to not cleanup after each test. However, in order to facilitate [clean up scripts](https://github.com/cloudfoundry/cli/blob/master/bin/cleanup-integration), we are trying to keep consistent naming across organizations, spaces, etc. 41 42 In addition, several router groups are created using a `INTEGRATION-TCP-NODE-[NUMBER]` format. These cannot be deleted without manual changes to the database.