test(build): add comprehensive test coverage for build.clj refactor#2
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
test(build): add comprehensive test coverage for build.clj refactor#2devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
1182d98 to
3ab939e
Compare
- Add 26 tests (66 assertions) covering all build.clj functions: required-version, jar-file-path, pom-file-path, resolved-clojars-repository, clean, jar, install, deploy, and pom-data structure validation - Verify pom-data SCM nesting is correct after indentation change - Verify behavioral equivalence of jar-file-path/pom-file-path with old globals - Add :test-build alias in deps.edn and test-build task in bb.edn - Add test_build_runner.clj mirroring existing test-db-runner pattern
d4862df to
45233d6
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.
Summary
Adds 26 tests (66 assertions) covering all functions in
build.clj, which previously had zero test coverage. This was motivated by the recentrefactor(build): streamline release workflowcommit which made several structural changes:version/jar-file/pom-filedefs with per-call helpers (required-version,jar-file-path,pom-file-path)jar/install/deploysignatures from[_]to[opts]with required:versionresolved-clojars-repositoryhelperpom-data[:scm ...]vectorWhat's tested:
lib,class-dir,scm-url,basis)pom-datastructure, including that SCM children (:connection,:developerConnection,:tag) are still nested inside[:scm ...]after the indentation changerequired-version,jar-file-path,pom-file-path,resolved-clojars-repositoryclean,jar,install,deploy— orchestration order, argument threading, and error casesInfrastructure: Adds a
:test-buildalias indeps.edn, atest-buildbb task, and atest_build_runner.clj— mirroring the existingtest-dbpattern. Build tests are kept separate frombb test/bb verifybecause they require the:builddependencies.Review & Testing Checklist for Human
pom-dataSCM nesting inbuild.clj— The refactor changed indentation on lines 19–22 ofbuild.cljmaking:connection/:developerConnection/:taglook like they might be siblings of[:scm ...]rather than children. Bracket counting says they're still nested correctly, but visually it's misleading. Thepom-data-scm-nesting-is-correcttest locks this in — confirm the test matches your intent."."in:test-buildextra-paths — The project root is added to the classpath sobuild.cljis loadable. This is scoped only to the:test-buildalias and mirrors how-T:buildworks, but verify you're comfortable with it.bb verify— Build tests are in a separate runner (liketest-db), sobb testandbb verifydo NOT run them. If you want them included in CI / verify, the wiring needs adjustment.bb test-buildlocally to confirm the new alias and task work end-to-end.Notes
bb test→ 0 failures, 0 errors).bb lint) and format check (bb format-check) both pass cleanly.pom-data-scm-tag-defaults-to-HEADtest conditionally skips its"HEAD"assertion whenGITHUB_REF_NAMEis set in the environment (e.g. in CI).b/delete,b/copy-dir,b/write-pom,b/jar,dd/deploy) are mocked viawith-redefs— tests verify wiring and argument threading, not that a real jar is produced.mainto resolve conflicts (no code changes from the rebase).Link to Devin session: https://app.devin.ai/sessions/0c6fb5edb4924d3fa4db87fef3075ccb
Requested by: @hatappo