Skip to content

Commit

Permalink
Add failing test case for google#624
Browse files Browse the repository at this point in the history
  • Loading branch information
rougsig committed Oct 27, 2022
1 parent ae6f00e commit 28fd3fd
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,29 @@ class ProtobufJavaPluginTest extends Specification {
gradleVersion << GRADLE_VERSIONS
}
@Unroll
void "generateTestProto should not execute :compileJava task (java-only project) [gradle #gradleVersion]"() {
given: "project from testProject"
File projectDir = ProtobufPluginTestHelper.projectBuilder('testProject')
.copyDirs('testProjectBase', 'testProject')
.build()
when: "build is invoked"
BuildResult result = ProtobufPluginTestHelper.getGradleRunner(
projectDir,
gradleVersion,
"generateTestProto"
).build()
then: "it succeed"
result.task(":generateTestProto").outcome == TaskOutcome.SUCCESS
assert !result.output.contains("Task :classes")
assert !result.output.contains("Task :compileJava")
where:
gradleVersion << GRADLE_VERSIONS
}
@Unroll
void "testProject should be successfully executed (configuration cache) [gradle #gradleVersion]"() {
given: "project from testProject"
Expand Down

0 comments on commit 28fd3fd

Please sign in to comment.