File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
build-tools/src/integTest/groovy/org/elasticsearch/gradle/test Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 11package org.elasticsearch.gradle.test
22
3+ import com.fasterxml.jackson.databind.ObjectMapper
34
45import org.elasticsearch.gradle.fixtures.AbstractGradleFuncTest
56import org.gradle.testkit.runner.TaskOutcome
@@ -39,8 +40,24 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest{
3940
4041 when :
4142 def result = gradleRunner(' generateTestBuildInfo' ). build()
43+ def task = result. task(" :generateTestBuildInfo" )
44+
4245
4346 then :
44- result. task(" :generateTestBuildInfo" ). outcome == TaskOutcome . SUCCESS
47+ task. outcome == TaskOutcome . SUCCESS
48+
49+ def output = file(" build/generated-build.info/test-build-info.json" )
50+ output. exists() == true
51+
52+ def location = Map . of(
53+ " module" , " com.example" ,
54+ " representativeClass" , " com/example/Example.class"
55+ )
56+ def expectedOutput = Map . of(
57+ " component" , " example-component" ,
58+ " locations" , List . of(location)
59+ )
60+ expectedOutput == new ObjectMapper (). readValue(output, Map . class)
61+
4562 }
4663}
You can’t perform that action at this time.
0 commit comments