40 lines
1.4 KiB
Groovy
40 lines
1.4 KiB
Groovy
plugins {
|
|
// Makes building the docker image a dependency of Gradle's "build" command. This way you could run your entire build inside a docker image
|
|
// via ./gradlew :airbyte-integrations:connectors:source-mongodb:build
|
|
id 'airbyte-docker'
|
|
id 'airbyte-standard-source-test-file'
|
|
}
|
|
|
|
airbyteStandardSourceTestFile {
|
|
def dbName = "mongo-airbyte-integration-test"
|
|
prehook {
|
|
project.exec {
|
|
def args = ["docker", "run", "--rm",
|
|
"--name", dbName,
|
|
"-d",
|
|
// assign to a weird port number so we don't conflict with any locally running mongo instances
|
|
"-p", "27888:27017",
|
|
"-e", "MONGO_INITDB_ROOT_USERNAME=user",
|
|
"-e", "MONGO_INITDB_ROOT_PASSWORD=password",
|
|
"airbyte/mongodb-integration-test-seed:dev"]
|
|
commandLine args
|
|
}
|
|
}
|
|
|
|
posthook {
|
|
project.exec {
|
|
commandLine "docker", "stop", dbName
|
|
}
|
|
}
|
|
|
|
// All these input paths must live inside this connector's directory (or subdirectories)
|
|
configPath = "integration_tests/valid_config.json"
|
|
configuredCatalogPath = "integration_tests/configured_catalog.json"
|
|
specPath = "lib/spec.json"
|
|
}
|
|
|
|
dependencies {
|
|
implementation files(project(':airbyte-integrations:bases:base-standard-source-test-file').airbyteDocker.outputs)
|
|
}
|
|
|