-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add test case to document env header contains whitespace error as expected behavior. #5081
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: njucjc <njucjc@gmail.com> Signed-off-by: MicahKimel <micah.kimel@my.wheaton.edu>
Signed-off-by: MicahKimel <micah.kimel@my.wheaton.edu>
Signed-off-by: racequite <quiterace@gmail.com> Signed-off-by: MicahKimel <micah.kimel@my.wheaton.edu>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com> Signed-off-by: MicahKimel <micah.kimel@my.wheaton.edu>
Signed-off-by: cncal <flycalvin@qq.com> Signed-off-by: MicahKimel <micah.kimel@my.wheaton.edu>
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.
Thank you for the PR :)
This already looks quite good. Just a few comments from my side.
if err == nil { | ||
t.Fatalf("Expected an ErrBadKey, got nothing") | ||
} |
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.
if err == nil { | |
t.Fatalf("Expected an ErrBadKey, got nothing") | |
} | |
assert.ErrorIs(t, err, ErrBadKey{"variable '[config 1]' contains whitespaces"}) |
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.
with this assertion we don't need the other checks below
- A valid CDI specification (JSON or YAML file) for the requested device is | ||
available on the system running the daemon, in one of the configured CDI | ||
specification directories. | ||
- The CDI feature has been enabled in the daemon; see [Enable CDI |
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.
- The CDI feature has been enabled in the daemon; see [Enable CDI | |
- The CDI feature has been enabled in the daemon. See [Enable CDI |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5081 +/- ##
=======================================
Coverage 61.33% 61.33%
=======================================
Files 298 298
Lines 20692 20691 -1
=======================================
Hits 12691 12691
+ Misses 7100 7099 -1
Partials 901 901 |
- What I did
[config 1]
will throw an error is expected behavior.docker run
throws error if an env var contains whitespace #5057- How to verify it
docker buildx bake test
looked good to me- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)