blob: 7324fa930308ef8542c6097b9735282deb7af165 [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.
*/
import groovy.json.JsonOutput
plugins { id 'org.apache.beam.module' }
applyJavaNature()
description = "Apache Beam :: SDKs :: Java :: Extensions :: Google Cloud Platform Core"
ext.summary = """Common components used to support multiple
Google Cloud Platform specific maven modules."""
// Exclude tests that need a runner
test {
systemProperty "beamUseDummyRunner", "true"
useJUnit {
excludeCategories "org.apache.beam.sdk.testing.NeedsRunner"
}
}
dependencies {
shadow library.java.vendored_guava_20_0
shadow project(path: ":sdks:java:core", configuration: "shadow")
shadow library.java.google_http_client_jackson2
shadow library.java.google_auth_library_oauth2_http
shadow library.java.google_api_client
shadow library.java.bigdataoss_gcsio
shadow library.java.bigdataoss_util
shadow library.java.google_api_services_cloudresourcemanager
shadow library.java.google_api_services_storage
shadow library.java.google_auth_library_credentials
shadow library.java.google_http_client
shadow library.java.slf4j_api
shadow library.java.joda_time
shadow library.java.jackson_annotations
shadow library.java.jackson_databind
provided library.java.hamcrest_core
provided library.java.junit
testCompile project(path: ":sdks:java:core", configuration: "shadowTest")
testCompile library.java.hamcrest_library
testCompile library.java.guava_testlib
testCompile library.java.mockito_core
testRuntimeOnly library.java.slf4j_jdk14
}
// Note that no runner is specified here, so tests running under this task should not be running
// pipelines.
task integrationTest(type: Test) {
group = "Verification"
def gcpProject = project.findProperty('gcpProject') ?: 'apache-beam-testing'
def gcpTempRoot = project.findProperty('gcpTempRoot') ?: 'gs://temp-storage-for-end-to-end-tests'
def dataflowKmsKey = project.findProperty('dataflowKmsKey') ?: "projects/apache-beam-testing/locations/global/keyRings/beam-it/cryptoKeys/test"
systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
"--project=${gcpProject}",
"--tempRoot=${gcpTempRoot}",
"--dataflowKmsKey=${dataflowKmsKey}",
])
// Disable Gradle cache: these ITs interact with live service that should always be considered "out of date"
outputs.upToDateWhen { false }
include '**/*IT.class'
maxParallelForks 4
classpath = sourceSets.test.runtimeClasspath
testClassesDirs = sourceSets.test.output.classesDirs
useJUnit { }
}
task postCommit {
group = "Verification"
description = "Integration tests of GCP connectors using the DirectRunner."
dependsOn integrationTest
}