antrea
antrea copied to clipboard
Fix running NPL unit test on MacOS
Add a portcache file to support go building across different OSs.
issue #3826
Signed-off-by: Shuyang Xin [email protected]
/test-all
Codecov Report
Merging #3945 (0cc3aac) into main (024254d) will decrease coverage by
25.70%
. The diff coverage is57.69%
.
:exclamation: Current head 0cc3aac differs from pull request most recent head d024004. Consider uploading reports for the commit d024004 to get more accurate results
@@ Coverage Diff @@
## main #3945 +/- ##
===========================================
- Coverage 67.51% 41.81% -25.71%
===========================================
Files 297 380 +83
Lines 44988 56225 +11237
===========================================
- Hits 30373 23508 -6865
- Misses 12238 30456 +18218
+ Partials 2377 2261 -116
Flag | Coverage Δ | |
---|---|---|
e2e-tests | 44.69% <57.69%> (?) |
|
integration-tests | 35.22% <ø> (-0.14%) |
:arrow_down: |
kind-e2e-tests | ? |
|
unit-tests | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...agent/nodeportlocal/portcache/port_table_others.go | 57.69% <57.69%> (ø) |
|
pkg/ipfix/ipfix_process.go | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
pkg/ipfix/ipfix_registry.go | 0.00% <0.00%> (-100.00%) |
:arrow_down: |
pkg/agent/openflow/pipeline_other.go | 3.84% <0.00%> (-96.16%) |
:arrow_down: |
.../agent/flowexporter/priorityqueue/priorityqueue.go | 0.00% <0.00%> (-93.34%) |
:arrow_down: |
pkg/ipfix/ipfix_intermediate.go | 0.00% <0.00%> (-90.91%) |
:arrow_down: |
pkg/controller/networkpolicy/endpoint_querier.go | 4.58% <0.00%> (-88.08%) |
:arrow_down: |
pkg/agent/flowexporter/connections/conntrack.go | 0.00% <0.00%> (-85.72%) |
:arrow_down: |
.../agent/flowexporter/connections/conntrack_linux.go | 0.00% <0.00%> (-85.49%) |
:arrow_down: |
pkg/util/flowexport/flowexport.go | 0.00% <0.00%> (-84.62%) |
:arrow_down: |
... and 327 more |
/test-all
golangci-lint(macos-latest) will fail if we only rename port_table_linux.go to port_table_others.go. So add port_table_others.go to handle situations other than linux and windows environment.
I'd rather merge #3936 first and then see what else we need to do
Sure, #3936 is also ready for review.
/test-all /test-windows-all
/test-all /test-windows-all
/test-e2e
I don't think we should add a brand new port_table file just to run unit tests on macOS. Why don't we use the Linux one?
Updated. I think we should update the name of port_table_linux.go to port_table_others.go because it also contains code for macOS.
Updated commit message
/test-all /test-windows-all
/test-e2e
/test-windows-e2e
/test-all
/test-conformance
/test-e2e