fix: Use ExtraHosts only for linux machines with native docker engine
TL;DR
Use ExtraHosts only for Linux machines with native docker engine
Type
- [x] Bug Fix
- [ ] Feature
- [ ] Plugin
Are all requirements met?
- [x] Code completed
- [x] Smoke tested
- [x] Unit tests added
- [x] Code documentation added
- [x] Any pending items have an associated Issue
Complete description
Detect whether /var/run/docker.sock is not a symbolic link and is a socket file. If true, add ExtraHosts. Otherwise, return empty ExtraHosts.
Tracking Issue
None
Follow-up issue
NA
Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.
Comparison is base (
9c87165) 67.69% compared to head (878526f) 67.71%.
:exclamation: Current head 878526f differs from pull request most recent head 7c83a52. Consider uploading reports for the commit 7c83a52 to get more accurate results
| Files | Patch % | Lines |
|---|---|---|
| pkg/docker/docker_util.go | 88.88% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #461 +/- ##
==========================================
+ Coverage 67.69% 67.71% +0.02%
==========================================
Files 148 148
Lines 6639 6647 +8
==========================================
+ Hits 4494 4501 +7
- Misses 1855 1856 +1
Partials 290 290
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 67.71% <88.88%> (+0.02%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.