@@ -5,7 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
55import org.elasticsearch.gradle.fixtures.AbstractGradleFuncTest
66import org.gradle.testkit.runner.TaskOutcome
77
8- class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest {
8+ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest {
99 def " works" () {
1010 given :
1111 file(" src/main/java/com/example/Example.java" ) << """
@@ -35,6 +35,7 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest{
3535
3636 tasks.withType(GenerateTestBuildInfoTask.class) {
3737 componentName = 'example-component'
38+ outputFile = new File('build/generated-build-info/plugin-test-build-info.json')
3839 }
3940 """
4041
@@ -46,18 +47,17 @@ class TestBuildInfoPluginFuncTest extends AbstractGradleFuncTest{
4647 then :
4748 task. outcome == TaskOutcome . SUCCESS
4849
49- def output = file(" build/generated-build. info/test-build-info.json" )
50+ def output = file(" build/generated-build- info/plugin- test-build-info.json" )
5051 output. exists() == true
5152
5253 def location = Map . of(
5354 " module" , " com.example" ,
54- " representativeClass " , " com/example/Example.class"
55+ " representative_class " , " com/example/Example.class"
5556 )
5657 def expectedOutput = Map . of(
5758 " component" , " example-component" ,
5859 " locations" , List . of(location)
5960 )
6061 new ObjectMapper (). readValue(output, Map . class) == expectedOutput
61-
6262 }
6363}
0 commit comments