Skip to content
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

feat: Improve parsing of Docker image tag version MatchVersion(Predicate<Version>) #1231

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

0xced
Copy link
Contributor

@0xced 0xced commented Aug 11, 2024

What does this PR do?

This pull request handles major-only version number, e.g. 2 without any dot that Version.TryParse doesn't parse. Matching a version was recently introduced in #1213 but did not account for major-only versions which are quite common in Docker image tags.

Why is it important?

Verifying a version on the major part of the tag version is sometimes enough.

Related issues

Relates #1213

How to test this PR

The MatchVersion_ReturnsTrue_WhenVersionMatchesPredicate test was updated from a Fact to a Theory handling many different version number inputs.

Handle major-only version number, e.g. `2` without any dot that Version.TryParse doesn't parse.
Copy link

netlify bot commented Aug 11, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit ac51c48
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/66b876f6ed56560008c1fd66
😎 Deploy Preview https://deploy-preview-1231--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Aug 12, 2024
@HofmeisterAn HofmeisterAn changed the title Improve Docker image tag version parsing feat: Improve parsing of Docker image tag version MatchVersion(Predicate<Version>) Aug 12, 2024
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 💪.

@HofmeisterAn HofmeisterAn merged commit ace1fe0 into testcontainers:develop Aug 12, 2024
11 checks passed
@0xced 0xced deleted the tag-version-parsing branch August 12, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants