blob: 491d128fa7b089ee733267955c5eebded7ab0354 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
* http://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.
*/
apply plugin: 'scala'
apply plugin: 'eclipse'
compileTestScala.options.encoding = 'UTF-8'
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
mavenLocal()
}
def commonConfiguration = {
systemProperty 'testthreads', System.getProperty('testthreads', '1')
systemProperty 'health_url', System.getProperty('health_url', '')
systemProperty 'host', System.getProperty('host', '')
systemProperty 'port', System.getProperty('port', '')
systemProperty 'trigger.suffix', System.getProperty('trigger.suffix', '')
systemProperty 'max.retries', System.getProperty('max.retries', '60')
testLogging {
events "passed", "skipped", "failed"
showStandardStreams = true
exceptionFormat = 'full'
}
outputs.upToDateWhen { false } // force tests to run everytime
}
test {
configure commonConfiguration
exclude 'system/stress/**'
}
task testWithoutCredentials(type: Test) {
configure commonConfiguration
}
task stress(type: Test) {
configure commonConfiguration
include 'system/stress/**'
}
task testHealth(type: Test) {
configure commonConfiguration
systemProperty 'test.router', 'true'
include 'system/health/**'
}
task testWithProducer(type: Test) {
configure commonConfiguration
exclude 'system/packages/MessageHubProduceTests.class'
exclude 'system/packages/MessagingServiceTests.class'
exclude 'system/stress/**'
}
task testWithProducerAndProducerAction(type: Test) {
configure commonConfiguration
exclude 'system/stress/**'
exclude 'system/packages/MessagingServiceTests.class'
}
task testMessageHub(type: Test) {
configure commonConfiguration
exclude 'system/stress/**'
exclude 'system/health/**'
exclude 'system/packages/MessagingServiceTests.class'
exclude 'system/packages/KafkaFeedTests.class'
exclude 'system/packages/KafkaFeedWebTests.class'
exclude 'system/packages/KafkaProduceTests.class'
}
dependencies {
compile "org.scala-lang:scala-library:${gradle.scala.version}"
compile 'com.ibm.messagehub:messagehub.login:1.0.0'
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
compile "org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.additionalParameters = gradle.scala.compileFlags
}