Skip to content

Commit

Permalink
integration test as separate source set and gradle task
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksei Doroganov <[email protected]>
  • Loading branch information
DevAleksei committed Dec 27, 2019
1 parent 539fa8a commit ac6c04f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions webapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ sourceSets {
srcDir "config/test"
}
}
integrationTest {
kotlin {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integrationTest/kotlin')
}
}
}

configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}

task copyFrontendArtifacts(type: Copy) {
Expand All @@ -45,6 +57,21 @@ task copyFrontendArtifacts(type: Copy) {

processResources.dependsOn(copyFrontendArtifacts)

task integrationTest(type: Test, dependsOn: []) {
description = 'Runs integration tests.'
group = 'verification'
outputs.upToDateWhen { false }
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}

task integrationTestWithDocker(dependsOn: [":agentsComposeBuild", ":cordaComposeBuild", ":backendsComposeBuild", ":agentsComposeUp", ":cordaComposeUp", ":backendsComposeUp", integrationTest, ":backendsComposeDown", ":cordaComposeDown", ":agentsComposeDown"]) {
description = 'Start dockerised system and runs integration tests.'
group = 'verification'
}

integrationTest.mustRunAfter(":backendsComposeUp")

dependencies {

// CorDapp dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class TreatmentCenterE2E : E2ETest()

@RunWith(SpringRunner::class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
@Ignore("Precondition: Run start.sh")
//Precondition: Run start.sh
class RemoteE2E : E2ETest()

@Ignore("Do not use directly; Needs external setup")
Expand Down
File renamed without changes.

0 comments on commit ac6c04f

Please sign in to comment.