67 lines
2.0 KiB
Groovy
67 lines
2.0 KiB
Groovy
/*
|
|
* Copyright 2002-2019. the original author or authors.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* https://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
maven { url "https://plugins.gradle.org/m2/" }
|
|
}
|
|
|
|
dependencies {
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
|
|
}
|
|
}
|
|
|
|
description = "Spring Cloud App Broker Acceptance Tests"
|
|
|
|
// don't publish the jar for the acceptance tests project
|
|
configurations.archives.artifacts.clear()
|
|
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
dependencies {
|
|
compile project(":spring-cloud-starter-app-broker-cloudfoundry")
|
|
compile("org.springframework.boot:spring-boot-starter-webflux")
|
|
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
|
testCompile("org.junit.jupiter:junit-jupiter-api")
|
|
testCompile("org.springframework.boot:spring-boot-starter-test")
|
|
testCompile("io.projectreactor:reactor-test")
|
|
testCompile("org.assertj:assertj-core")
|
|
}
|
|
|
|
// build the test broker from /src into a jar that the tests can deploy
|
|
test.dependsOn assemble
|
|
|
|
// omit the version from the test broker jar file
|
|
jar {
|
|
version = ''
|
|
}
|
|
bootJar {
|
|
version = ''
|
|
}
|
|
|
|
test {
|
|
maxParallelForks = Runtime.runtime.availableProcessors() - 1 ?: 1
|
|
|
|
// Only run the tests if acceptanceTests is specified
|
|
onlyIf {
|
|
project.hasProperty("acceptanceTests")
|
|
}
|
|
systemProperty "tests.broker-app-path", "${buildDir}/libs/spring-cloud-app-broker-acceptance-tests.jar"
|
|
// Pass relevant java properties to the test task
|
|
systemProperties << System.properties.findAll { it.key.startsWith("spring.") }
|
|
}
|