In order to run DRATs using an integration config file, you can use scripts/run_acceptance_tests_local_with_config.sh
or on the jumpbox using ginkgo
.
- Create an integration config json file e.g. integration_config.json:
- Export the following environment variables:
BBR_BUILD_PATH
: Path to yourbbr
binaryCONFIG
: Path to yourintegration_config.json
- Run the tests
$> go mod tidy $> go run github.com/onsi/ginkgo/v2/ginkgo -v --trace acceptance
- Create an integration config json file e.g. integration_config.json:
- Setup the following environment variables:
BBR_BUILD_PATH
- Add the following additional properties to the integration config:
ssh_proxy_user
: The jumpbox userssh_proxy_host
: The jumpbox hostssh_proxy_private_key
: The jumpbox private key
- Run
scripts/run_acceptance_tests_local_with_config.sh
To run all of the default test cases in DRATs, you must set the following integration config properties:
Required Integration Config Properties | 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 user |
`cf_admin_password` | Cloud Foundry API admin password |
`credhub_client_name` | Credhub for Cloud Foundry admin user |
`credhub_client_secret` | Credhub for Cloud Foundry admin password |
`bosh_environment` | URL of BOSH Director which has deployed the above Cloud Foundries |
`bosh_client` | BOSH Director username |
`bosh_client` | BOSH Director password |
`bosh_ca_cert` | BOSH Director's CA cert content |
`include_TESTCASE_NAME` | Flag for whether to run a given testcase; if omitted, it defaults to false |
For further configure the run of DRATs, you can set the following integration config properties:
Optional Integration Config Property | Usage |
---|---|
`timeout_in_minutes` | 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!** |
**If these variables are not set, all test suites will be run.
To also run the test case for the optional component NFS Broker, set the following properties:
NFS Broker Integration Config Property | Usage |
---|---|
`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 |
To also run the test case for the optional component SMB Broker, set the following properties:
SMB Broker Integration Config Property | Usage |
---|---|
`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 |
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 |