= Spring Cloud App Broker Acceptance Tests
== Running locally
=== Compile the project
$ ./gradlew build
=== Run the tests
The tests require the following properties to be set:
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.api-host` - The CF API host where the tests are going to run.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.api-port` - The CF API port where the tests are going to run.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.default-org` - The CF organization where the tests are going to run.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.default-space` - The CF space where the tests are going to run.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.skip-ssl-validation` - If SSL validation should be skipped.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.username` - The CF API username.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.password` - The CF API password.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.client-id` - The CF API OAuth2 client ID.
* `spring.cloud.appbroker.acceptance-test.cloudfoundry.client-secret` - The CF API OAuth2 client secret.
When running tests from an IDE, the following property must also be set (it is set automatically when running the entire suite via Gradle):
* `tests.broker-app-path` - The path to the test broker jar file (eg. `spring-cloud-app-broker-acceptance-tests/build/libs/spring-cloud-app-broker-acceptance-tests.jar`).
These properties can be set with `-D` system properties on the gradle command line.
Also, the flag acceptanceTests must be provided as `-PacceptanceTests`.
[source,bash]
----
$ ./gradlew test -PacceptanceTests \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.api-host=api.cf.my.cf.io \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.api-port=443 \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.default-org=test \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.default-space=development \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.skip-ssl-validation=true \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.username=admin \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.password=password \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.client-id=admin \
-Dspring.cloud.appbroker.acceptance-test.cloudfoundry.client-secret=secret
----