cloudfoundry/sync-integration-tests

Name: sync-integration-tests

Owner: Cloud Foundry

Description: null

Created: 2017-01-14 00:24:16.0

Updated: 2018-05-14 21:54:33.0

Pushed: 2018-05-14 21:54:31.0

Homepage: null

Size: 9238

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Sync Integration Tests

i_sits

Description

This is a set of tests to test the sync functionality between Cloud Controller and Diego. It forces Cloud Controller and Diego into different states so that the sync process has to reconcile them.

This test suite covers both long running processes (lrps) and Tasks. There are fundamental differences on how lrps and tasks are handled by the syncing processes. This difference implies that the way to create situations where Diego and Cloud Controller go out-of-sync is very different between lrps and tasks.

Config and Run

Running against a bosh-lite deployed with bosh-deployment
et github.com/golang/dep/cmd/dep
ensure
n-bosh-lite.sh
Running with manual configuration

You need a config JSON file path set at the CONFIG environment variable. An example that can be used for bosh-lite is:

rt CONFIG=${config_path}/config.json
> "$CONFIG" <<EOF

f_api": "api.bosh-lite.com",
f_admin_user": "admin",
f_admin_password": "admin",
f_skip_ssl_validation": true,
f_apps_domain": "bosh-lite.com",
bs_client_cert": "${bbs_client_cert_path}",
bs_client_key": "${bbs_client_key_path}",
osh_binary": "bosh",
osh_api_instance": "api",
osh_deployment_name": "cf",
osh_ca_cert": "${director_ca_cert}",
osh_client": "admin",
osh_client_secret": "${bosh_password}",
osh_environment": "https://192.168.50.6:25555",
osh_gw_user": "jumpbox",
osh_gw_host": "192.168.50.6",
osh_gw_private_key": "${director_gw_key}"


go -nodes=3

Here's how you would manually extract settings and credentials, assuming cf was deployed with the option --vars-store ~/deployments/vbox/deployment-vars.yml:

/deployments/vbox
 interpolate --path /admin_password creds.yml >bosh_client_secret
 interpolate --path /cc_tls/certificate deployment-vars.yml >cc_client.crt
 interpolate --path /cc_tls/private_key deployment-vars.yml >cc_client.key
 interpolate --path /jumpbox_ssh/private_key creds.yml >bosh_gw_private_key

Once the file config.json is ready, let it roll…

IG=config.json ginkgo -nodes=3

Adding dependencies

During development of test cases, if you need to add a new Golang dependency, make sure to add it to the vendor directory using dep.

ensure -add <your new package> // you must import/use this package before running `dep ensure`

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.