Excavator: Migrate Groovy nebula test AssetDistributionPluginIntegrationSpec to the new Java Junit framework#1944
Open
svc-excavator-bot wants to merge 1 commit intodevelopfrom
Conversation
7307230 to
09744f0
Compare
…tionSpec` to the new Java Junit framework
09744f0 to
6e3fd86
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
excavator is a bot for automating changes across repositories.
Changes produced by the roomba/migrate-gradle-testing-junit-framework check.
A formatted diff between the old and new test has been generated at test-migration-notes/AssetDistributionPluginIntegrationSpec.html)
To view the rendered diff, copy the branch name above, click here, and then replace the BRANCH_NAME part of the URL with the branch name.
🤖 🤖 This PR was created using Claude-code 🤖 🤖
Model:
opusClaude Execution Message
Claude finished running successfully.
The migration is complete. Here's a summary of what was done:
Files modified:
gradle-sls-packaging/src/test/groovy/.../AssetDistributionPluginIntegrationSpec.groovy- Added***DELINEATOR FOR REVIEWcomments to delineate test methods,when:,then:,expect:blocks, and the helper methodFiles created:
gradle-sls-packaging/src/test/java/.../AssetDistributionPluginIntegrationTest.java- The migrated Java testtest-migration-errors.md- Log of errors encountered and fixes appliedMigration details:
@Disabled, previously@Ignore)@GradlePluginTestsand@DisabledConfigurationCacheannotations addedcreateUntarBuildFilehelper method migrated to returnGradleFilefor fluent chaining.plugins().add()API instead of text blockswhere:blocks).as()descriptions and chained AssertJ assertionsYAMLFactoryconsistent with existing migrated tests./gradlew :gradle-sls-packaging:compileTestJavaOne error fixed during compilation:
com.palantir.gradle.dist.Versionsimport (class is in Groovy source set, not visible to Java compiler; no longer needed since the@Disabledtest uses.plugins().add()without a version)Claude Code Metrics
Migration Notes
Test Migration Errors
AssetDistributionPluginIntegrationSpec -> AssetDistributionPluginIntegrationTest
First pass errors
com.palantir.gradle.dist.Versionsnot foundVersions.javafile is located in the Groovy test source set (src/test/groovy/), which is not visible to the Java test compiler.Versions.GRADLE_CONSISTENT_VERSIONSconstant was only used in the original Groovy test for the@Ignored test to specify a plugin version inline. In the new framework, the plugin is added via.plugins().add("com.palantir.consistent-versions")without a version (it comes fromgradlePluginForTesting), so the import was unnecessary.Second pass review changes
createUntarBuildFilefrom the top of the class (after theOBJECT_MAPPERfield) to the end of the class, matching the original Groovy file where it was the last method. This is also consistent with the pattern inConfigTarTaskIntegrationTest.java.No other changes were needed on the second pass. All best practices from the testing guide were already followed:
@GradlePluginTestsand@DisabledConfigurationCacheannotations present.plugins().add()API (noapply plugin:in text blocks).as()descriptions on all assertionsdistsubprojectGradleFilefor fluent chainingYAMLFactoryconsistent with existing migrated testsTo enable or disable this check, please contact the maintainers of Excavator.