Skip to content

Commit

Permalink
Add kill_uaa script before run and integrationTest tasks
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Protsiuk <ivan.protsiuk@broadcom.com>
  • Loading branch information
duanemay authored and Tallicia committed May 30, 2024
1 parent eedb443 commit 317d2da
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,18 @@ project.gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
}

//task declarations
task run(dependsOn: cargoRunLocal)
tasks.register('killUaa', Exec) {
workingDir './'
executable = 'scripts/kill_uaa.sh'
}

tasks.register('run') {
dependsOn killUaa
dependsOn cargoRunLocal
}

task manifests(dependsOn: assemble, type: Copy) {
tasks.register('manifests', Copy) {
dependsOn assemble
from("uaa/src/test/resources/sample-manifests") {
include("**/*.yml")
filter(ReplaceTokens,
Expand All @@ -258,14 +267,17 @@ task manifests(dependsOn: assemble, type: Copy) {
into("build/sample-manifests")
}

task cleanCargoConfDir {
tasks.register('cleanCargoConfDir') {
delete(file(System.getProperty("java.io.tmpdir") + "/cargo/uaa-${applicationPort}"))
try {
Files.createDirectory(Paths.get(System.getProperty("java.io.tmpdir") + "/uaa-${applicationPort}"))
} catch (ignored) {}
} catch (ignored) {
}
}

task integrationTest(type: Test, dependsOn: subprojects.integrationTest) {
tasks.register('integrationTest', Test) {
dependsOn killUaa
dependsOn subprojects.integrationTest
finalizedBy cargoStopLocal
}

Expand Down

0 comments on commit 317d2da

Please sign in to comment.