Repository navigation
[EnvironmentCookbookVersionsEndpoint] Add rspec tests - #360
Merged
Merged
Conversation
…y_constraint Add unit tests for the EnvironmentCookbookVersionsEndpoint helpers: - sort_versions: descending semver sort, single element, empty, multi-digit - filter_by_constraint: nil passthrough, exact/>=/>~ constraints, no match, immutability Signed-off-by: David Crosby <dcrosby@fb.com>
Add comprehensive unit tests for the depsolve dependency solver: - empty versions returns nil and sets @last_constraint_failure - empty unsolved list returns desired_versions unchanged - single cookbook with no dependencies resolves to latest - cookbook with satisfiable dependency resolves both - missing dependency cookbook returns nil and sets @last_missing_dep - backtracking to older version when newest has unsatisfiable dep - environment constraints applied to dependency versions - dependency's own version constraint filters available versions - pre-tracked dependency not narrowed to single version (known failure) - unsatisfiable dep constraint (all versions filtered) returns nil - cache accumulates entries for all resolved cookbooks - multiple independent unsolved cookbooks resolve to latest - diamond dependency (two cookbooks sharing a dep) - conflicting dependency constraints returns nil - deep dependency chain (A -> B -> C) - multiple backtracking steps (v3, v2 fail, v1 succeeds) - cookbook with missing metadata key uses fallback Signed-off-by: David Crosby <dcrosby@fb.com>
dafyddcrosby
force-pushed
the
test_depsolve_pt1
branch
from
February 10, 2026 19:40
ab35b2b to
3ceb813
Compare
dafyddcrosby
marked this pull request as ready for review
February 10, 2026 19:40
|
tpowell-progress
approved these changes
Feb 10, 2026
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.



These are incredibly complex methods, and I want to make sure I'm not breaking something in any future commits trying to speed up depsolving
Types of changes
Checklist:
Gemfile.lockhas changed, I have used--conservativeto do it and included the full output in the Description above.