-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fixes when no equal sign in label file #1416
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Lifubang <lifubang@acmcoder.com>
Codecov Report
@@ Coverage Diff @@
## master #1416 +/- ##
==========================================
+ Coverage 54.26% 54.39% +0.13%
==========================================
Files 289 289
Lines 19331 19268 -63
==========================================
- Hits 10490 10481 -9
+ Misses 8165 8115 -50
+ Partials 676 672 -4 |
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 🐸
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.
Haven't checked yet, but is this same function also used for env-files? If so, should it behave the same?
We should at least have a test for this, as the behavior of empty values vs not-set is already tricky, so easy to introduce regressions / change in behavior
Yeah, but for |
Thank you for all your review, I'll add some test cases. |
ee54671
to
a2bea38
Compare
Signed-off-by: Lifubang <lifubang@acmcoder.com>
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.
I have add two test cases for label/env file without equal sign.
@thaJeztah I don't know if I have understood your points. Do you mean add some test cases, or change code to check the lines value? |
ping @thaJeztah |
Signed-off-by: Lifubang lifubang@acmcoder.com
- What I did
When use --label:
./build/docker run -d --name=redis5 --label foo redis
When use --label-file:
label foo is lost.
The behavior of --label and --label-file is different when there is no equal sign after label variable.
- How I did it
When there is no equal sign after label variable, and no emptyFn, add it to output.
- How to verify it
After fix:
- Description for the changelog
fixes when no equal sign in label file
- A picture of a cute animal (not mandatory but encouraged)