-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
- Loading branch information
1 parent
0247670
commit b704016
Showing
4 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ plugins { | |
} | ||
|
||
airbytePython { | ||
moduleDirectory 'base_python_test' | ||
moduleDirectory 'standard_test' | ||
} | ||
|
||
|
||
|
20 changes: 1 addition & 19 deletions
20
airbyte-integrations/connectors/source-hubspot/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
|
||
class AirbyteStandardTestPlugin implements Plugin<Project> { | ||
void apply(Project project) { | ||
project.task('standardTest') { | ||
doFirst { | ||
project.exec { | ||
def targetMountDirectory = "/test_input" | ||
def args = [ | ||
'docker', 'run', '--rm', '-i', | ||
// provide access to the docker daemon | ||
'-v', "/var/run/docker.sock:/var/run/docker.sock", | ||
// A container within a container mounts from the host filesystem, not the parent container. | ||
// this forces /tmp to be the same directory for host, parent container, and child container. | ||
'-v', "/tmp:/tmp", | ||
// mount the project dir. all provided input paths must be relative to that dir. | ||
'-v', "${project.projectDir.absolutePath}:${targetMountDirectory}", | ||
'airbyte/standard-test:dev', | ||
'--standard_test_config', "$targetMountDirectory", | ||
] | ||
commandLine args | ||
} | ||
} | ||
|
||
outputs.upToDateWhen { false } | ||
} | ||
|
||
project.standardTest.dependsOn(':airbyte-integrations:bases:standard-test:airbyteDocker') | ||
project.standardTest.dependsOn(project.build) | ||
project.standardTest.dependsOn(project.airbyteDocker) | ||
if (project.hasProperty('airbyteDockerTest')){ | ||
project.standardTest.dependsOn(project.airbyteDockerTest) | ||
} | ||
|
||
// make sure we create the integrationTest task once in case a java integration test was already initialized | ||
if (!project.hasProperty('integrationTest')) { | ||
project.task('integrationTest') | ||
} | ||
|
||
project.integrationTest.dependsOn(project.standardTest) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters