-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code coverage for flow aggregator
Add code coverage for flow aggregator binary when running end-to-end tests on different platforms (kind, jenkins, VMC etc.)
- Loading branch information
1 parent
3de66cc
commit 43766ca
Showing
8 changed files
with
119 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM golang:1.15 as flow-aggregator-build | ||
|
||
WORKDIR /antrea | ||
|
||
COPY . /antrea | ||
|
||
RUN make flow-aggregator flow-aggregator-instr-binary | ||
|
||
FROM antrea/base-ubuntu:2.14.0 | ||
|
||
LABEL maintainer="Antrea <projectantrea-dev@googlegroups.com>" | ||
LABEL description="The docker image for the flow aggregator with code coverage measurement enabled for testing purposes." | ||
|
||
USER root | ||
|
||
COPY --from=flow-aggregator-build /antrea/bin/flow-aggregator* /usr/local/bin/ |
24 changes: 24 additions & 0 deletions
24
build/yamls/flow-aggregator/patches/coverage/startFlowAggCov.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: flow-aggregator | ||
namespace: flow-aggregator | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- args: | ||
- -test.run=TestBincoverRunMain | ||
- -test.coverprofile=flow-aggregator.cov.out | ||
- --config | ||
- /etc/flow-aggregator/flow-aggregator.conf | ||
- --logtostderr=false | ||
- --log_dir=/var/log/flowaggregator | ||
- --alsologtostderr | ||
- --log_file_max_size=100 | ||
- --log_file_max_num=4 | ||
- --v=0 | ||
command: | ||
- flow-aggregator-coverage | ||
name: flow-aggregator | ||
image: antrea/flow-aggregator-coverage:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters