-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapitest.gradle
More file actions
50 lines (39 loc) · 1.02 KB
/
apitest.gradle
File metadata and controls
50 lines (39 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
tasks.register('apiTest', Test) {
description = "Runs api tests against docker-compose stack"
group = "Verification"
mustRunAfter tasks.named('test')
testClassesDirs = sourceSets.apiTest.output.classesDirs
classpath = sourceSets.apiTest.runtimeClasspath
useJUnitPlatform()
dependsOn tasks.composeUp
finalizedBy tasks.composeDown
}
tasks.named('check') {
dependsOn tasks.named('apiTest')
}
tasks.named('build') {
dependsOn tasks.named('test')
dependsOn tasks.named('apiTest')
}
sourceSets {
apiTest {
java {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
}
dockerCompose {
useComposeFiles = ['docker-compose.yml']
startedServices = ['db', 'app']
buildBeforeUp = true
waitForTcpPorts = true
upAdditionalArgs = ['--wait', '--wait-timeout', '120']
captureContainersOutput = true
removeOrphans = true
stopContainers = true
removeContainers = true
projectName = "app"
useDockerComposeV2 = true
dockerExecutable = 'docker'
}