Skip to content

client/version: expand test coverage and remove golang.org/x/mod test dependency - #767

Merged
joe0BAB merged 2 commits into
docker:mainfrom
thaJeztah:rm_mod
Dec 6, 2026
Merged

joe0BAB merged 2 commits into
docker:mainfrom
thaJeztah:rm_mod

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

client/version: expand test coverage

Extend the semver test vectors to cover large numeric identifiers,
numeric and ASCII ordering, equivalent versions, and malformed
identifiers.

Add tests for MustNewName, MustNewVersion, Compare, and the remaining
version validation path.

This brings the version package to 100% statement coverage in
preparation for removing the golang.org/x/mod test dependency.

client/version: remove golang.org/x/mod test dependency

Replace differential semver tests with explicit validity and
precedence assertions, retaining all existing test vectors and
exhaustive pairwise comparisons.

Replace differential fuzz testing with checks for comparator
invariants, including reflexivity, antisymmetry, and transitivity.

This removes the remaining dependency on golang.org/x/mod from
the client module while retaining 100% statement coverage.

Extend the semver test vectors to cover large numeric identifiers,
numeric and ASCII ordering, equivalent versions, and malformed
identifiers.

Add tests for MustNewName, MustNewVersion, Compare, and the remaining
version validation path.

This brings the version package to 100% statement coverage in
preparation for removing the golang.org/x/mod test dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Replace differential semver tests with explicit validity and
precedence assertions, retaining all existing test vectors and
exhaustive pairwise comparisons.

Replace differential fuzz testing with checks for comparator
invariants, including reflexivity, antisymmetry, and transitivity.

This removes the remaining dependency on golang.org/x/mod from
the client module while retaining 100% statement coverage.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztah requested a review from a team as a code owner December 4, 2026 16:43
@joe0BAB
joe0BAB merged commit 9b218b4 into docker:main Dec 6, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants