-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Test version command #12576
Test version command #12576
Conversation
I honestly don't feel like this command requires a test... |
@ndeloof That's fair, I added the test because:
Please let me know what areas you'd prefer to prioritize for future tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a minor note
cmd/compose/version_test.go
Outdated
defer func() { | ||
internal.Version = originalVersion | ||
}() | ||
internal.Version = "v2.33.0-desktop.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version string is very specific to Docker Desktop and will be outdated once we release v2.34, I fear this will bring some confusion. Better use a pure fake version for testing purpose: v9.9.9-test
for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ndeloof Good suggestion, done. If there are other areas you'd like unit tests prioritized, just shout.
c32f122
to
6a993dc
Compare
Signed-off-by: Max Proske <[email protected]>
Head branch was pushed to by a user without write access
6a993dc
to
3fbe1f8
Compare
What I did
Added unit tests for
docker compose version
to ensure correct formatting.