Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 2.63 KB

test-overview.md

File metadata and controls

69 lines (53 loc) · 2.63 KB

Test Overview

Unit, integration and template tests

To run everything:

cd cf-networking-release
./scripts/docker-test
./scripts/template-tests

To run individual tests during development:

cd cf-networking-release
./scripts/docker-shell-with-started-db
# now use ginkgo to run whatever tests you want

Acceptance tests

Acceptance tests require a fully deployed Cloud Foundry.

⚠️ Warning: these tests remove default security groups. Do not run these tests on a prod environment.

  1. Make the following config.yml and fill in the properties
{
  "api": "API_URL",
  "admin_user": "admin",
  "admin_password": "ADMIN_PASSWORD", # this should be in credhub as "cf_admin_password"
  "admin_secret": "ADMIN_SECRET", # this should be in credhub as "uaa_admin_client_secret"
  "apps_domain": "APPS_DOMAIN",
  "default_security_groups": [ "dns", "public_networks" ], # check these against your own security groups.
  "skip_ssl_validation": true,
  "test_app_instances": 2,
  "test_applications": 2,
  "proxy_instances": 1,
  "proxy_applications": 1,
  "extra_listen_ports": 2,
  "prefix":"cf-networking-test-app"
}
  1. Run the following command for c2c acceptance tests:
CONFIG=config.yml APPS_DIR=${PWD}/src/example-apps ginkgo -v
src/code.cloudfoundry.org/test/acceptance

  1. Run the following command for service discovery acceptance tests:
CONFIG=config.yml APPS_DIR=${PWD}/src/example-apps ginkgo -v src/code.cloudfoundry.org/test/acceptance-sd

Foundation configuration tips & tricks

The following ops files are required to ensure a successful run:

⚠️ The vxlan-policy-agent.properties.policy_poll_interval_seconds should be <= 5.

Running the app outbound connection rate limit test

This test is disabled by default and could be enabled by setting run_experimental_outbound_conn_limit_test to true as part of the test config.yml above. Additionally the limit-app-outbound-connections.yml ops file is required to properly configure and enable the connection rate limiting feature.