build(app-bootstrap): test가 승인 스냅숏 파일을 입력으로 선언한다 #60
@@ -440,6 +440,18 @@ tasks.named('architectureTest', Test) {
|
||||
tasks.named('conditionalTransportBuildContractTest', Test) {
|
||||
inputs.file('build.gradle').withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName('buildScript')
|
||||
}
|
||||
// The ApprovalTests snapshot tests (EnvelopeContractTest) compare what they build with the
|
||||
// *.approved.* files beside their sources. Gradle compiles only the .java files under src/test/java
|
||||
// and copies only src/test/resources, so without this input a change to a snapshot alone left `test`
|
||||
// up to date or let it come from the build cache: the comparison did not run and the build passed.
|
||||
// The .received.* files next to them are output, not input: every comparison writes one, a passing
|
||||
// comparison deletes it and a failing one leaves it behind.
|
||||
tasks.named('test', Test) {
|
||||
inputs.files(fileTree('src/test/java') { include '**/*.approved.*' })
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
.ignoreEmptyDirectories()
|
||||
.withPropertyName('approvedSnapshots')
|
||||
}
|
||||
|
||||
// Fast developer test lane. Whole-repository ArchUnit graphs and full composition-root boot
|
||||
// characterizations have their own source sets, so the ordinary lane does not compile or execute
|
||||
|
||||
Reference in New Issue
Block a user