-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ConfigurationTest success check more robust #221
Conversation
@@ -44,7 +44,6 @@ class ConfigurationTest : AbstractBufIntegrationTest() { | |||
} | |||
|
|||
private fun assertSuccess() { | |||
val result = gradleRunner().withArguments(":tasks").build() | |||
assertThat(result.output).doesNotContain("cannot use both the protobuf-gradle-plugin and a Buf workspace") | |||
assertThat(gradleRunner().withArguments(":tasks").build().output.contains("BUILD SUCCESSFUL")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think build()
itself verifies success, but this doesn't hurt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there's no need for any kind of assert in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you happen to verify that no assertion was needed (like tweaking the config files to expect failure and making sure the test fails)? If so, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was able to verify that the test will fail if there is any sort of build error in the resources dir. I also am adding a couple more test cases to nail things down.
0b4c989
to
394f376
Compare
1e8bf3e
to
bd5f6ab
Compare
@@ -28,23 +28,28 @@ class ConfigurationTest : AbstractBufIntegrationTest() { | |||
assertFailure() | |||
} | |||
|
|||
@Test | |||
fun `project cannot use buf yaml workspaces and the protobuf gradle plugin first`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For naming consistency with the other test cases, maybe "project cannot use buf-work-yaml and the protobuf-gradle-plugin, protobuf applied first"? Or does this new name miss the intent of this test case?
No description provided.