Expand Gradle plugin's docs on setting bootRun's system properties
Closes gh-23578
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -68,4 +68,17 @@ class RunningDocumentationTests {
|
||||
.build("optimizedLaunch").getOutput()).contains("false");
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void bootRunSystemPropertyDefaultValue() throws IOException {
|
||||
assertThat(this.gradleBuild.script("src/main/gradle/running/boot-run-system-property")
|
||||
.build("configuredSystemProperties").getOutput()).contains("com.example.property = default");
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void bootRunSystemPropetry() throws IOException {
|
||||
assertThat(this.gradleBuild.script("src/main/gradle/running/boot-run-system-property")
|
||||
.build("-Pexample=custom", "configuredSystemProperties").getOutput())
|
||||
.contains("com.example.property = custom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user