Home

Awesome

Cloud Foundry Java Buildpack System Tests

The purpose of this repository is to exercise the Cloud Foundry Java Buildpack together with its dependencies to ensure that the whole works together correctly.

The tests are JUnit tests in a Maven build which push the Java Test Applications to Cloud Foundry.

The Cloud Foundry Java Client is used to drive the Cloud Foundry Cloud Controller REST API.

Running Tests

The project depends on Java 8. You must also have cloned built the Java Test Applications in a repository that is a peer to this one. To run the tests, run the following:

$ ./mvnw clean test

Configuration

The tests are extremely configurable allowing fine-grained control over what applications are tested.

Application Types:

General Configuration

The following configuration elements are required and define where the tests will run.

Environment VariableValue
TEST_BUILDPACKThe buildpack to use when staging test applications
TEST_HOSTThe host of the Cloud Foundry being tested on
TEST_ORGANIZATIONThe organization to test in
TEST_PASSWORDThe password of the user
TEST_SKIPSSLVALIDATIONWhether to skip SSL validation against the Cloud Foundry
TEST_SPACEThe space to test in
TEST_USERNAMEThe name of the user

Test Configuration

The following configuration elements define what tests will run.

Environment VariableValue
TEST_<APPLICATION>Whether the health tests for a particular application are enabled

Application Configuration

The following configuration elements define details about the test applications.

Environment VariableValue
APPLICATIONS_ROOTThe path to the built java-test-applications repository
APPLICATIONS_<APPLICATION>_ENABLEDWhether the application is pushed to Cloud Foundry
APPLICATIONS_<APPLICATION>_MEMORYThe amount of memory allocated for the application, overriding the value in the manifest.yml
APPLICATIONS_<APPLICATION>_PREFIXThe application name prefix for the application

Contributing

Pull requests are welcome; see the contributor guidelines for details.

License

This project is released under version 2.0 of the Apache License.