Skip to content

Latest commit

 

History

History
196 lines (186 loc) · 5.79 KB

testing_with_env_vars.md

File metadata and controls

196 lines (186 loc) · 5.79 KB

Running DRATs using environment variables

In order to run DRATs using environment variables, you can use scripts/run_acceptance_tests_local.sh.

Vanilla DRATs

For a vanilla run of DRATs, you need to set the following environment variables to run all of the default component test cases:

Environment Variable Usage
`CF_DEPLOYMENT_NAME` Name of the Cloud Foundry deployment to backup and restore
`CF_API_URL` Cloud Foundry API URL
`CF_ADMIN_USERNAME` Cloud Foundry API admin username
`CF_ADMIN_PASSWORD` Cloud Foundry API admin password
`CF_CREDHUB_CLIENT` Credhub for Cloud Foundry admin user
`CF_CREDHUB_SECRET` Credhub for Cloud Foundry admin password
`BOSH_ENVIRONMENT` URL of BOSH Director that deployed `CF_DEPLOYMENT_NAME`
`BOSH_CLIENT` BOSH Director username
`BOSH_CLIENT_SECRET` BOSH Director password
`BOSH_CA_CERT` BOSH Director's CA cert content
`BOSH_GW_HOST` Gateway host to use for BOSH SSH connection
`BOSH_GW_USER` Gateway user to use for BOSH SSH connection
`JUMPBOX_PRIVATE_KEY` Private key to use for BOSH SSH connection
`BBR_BUILD_PATH` Path to BBR binary

For further configure the run of DRATs, you can set the following environment variables:

Optional Environment Variable Usage
`DEFAULT_TIMEOUT_MINS` Timeout for commands run in the test (defaults to 15 minutes)
`SSH_DESTINATION_CIDR` Default to "10.0.0.0/8"; change if your CF deployment is deployed in a different internal network range
`DELETE_AND_REDEPLOY_CF` Set to "true" to have the CF deployment destroyed and redeployed from scratch during the test cycle. **Exercise extreme care when using this option!**
`FOCUSED_SUITE_NAME` A regex matching the name(s) of test suites that you **do** want DRATs to run**
`SKIP_SUITE_NAME` A regex matching the name(s) of test suites that you **do not** want DRATs to run**

**If these variables are not set, all test suites will be run.


DRATs with NFS Broker

To also run the test case for the optional component NFS Broker, set the following variables:

NFS Broker Environment Variable Usage
`INCLUDE_NFS_BROKER_TESTCASE` Set to "true" to run the NFS test case
`NFS_SERVICE_NAME` Required to run the NFS test case
`NFS_PLAN_NAME` Required to run the NFS test case
`NFS_CREATE_SERVICE_BROKER` Set to "true" to register the NFS service broker in the NFS test case
`NFS_BROKER_USER` Required to register the NFS service broker when running the NFS test case
`NFS_BROKER_PASSWORD` Required to register the NFS service broker when running the NFS test case
`NFS_BROKER_URL` Required to register the NFS service broker when running the NFS test case

DRATs with SMB Broker

To also run the test case for the optional component SMB Broker, set the following variables:

SMB Broker Environment Variable Usage
`INCLUDE_SMB_BROKER_TESTCASE` Set to "true" to run the SMB test case
`SMB_SERVICE_NAME` Required to run the SMB test case
`SMB_PLAN_NAME` Required to run the SMB test case
`SMB_CREATE_SERVICE_BROKER` Set to "true" to register the SMB service broker in the SMB test case
`SMB_BROKER_USER` Required to register the SMB service broker when running the SMB test case
`SMB_BROKER_PASSWORD` Required to register the SMB service broker when running the SMB test case
`SMB_BROKER_URL` Required to register the SMB service broker when running the SMB test case

DRATs with Selective Backup

If you have deployed your cf-deployment to selectively backup blobs, set the following variables:

Selective Backup Environment Variable Usage
`SELECTIVE_BACKUP` Set to "true" to run the EnsureAfterSelectiveRestore test case step
`SELECTIVE_BACKUP_TYPE` set to droplets or droplets_and_packages