Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
# review a PR in an area.
#
# Rules are evaluated in this order, and the last match is used for auto-assignment.
* @azure/azure-sdn-members
/.github/ @azure/acn-admins
/cns/ @azure/acn-cns-reviewers
/cni/ @azure/acn-cni-reviewers
/dropgz/ @rbtr @camrynl @paulyufan2 @ashvindeodhar @thatmattlong
/npm/ @azure/acn-npm-reviewers
/zapai/ @rbtr @ZetaoZhuang
* @azure/azure-sdn-members
/.github/ @azure/acn-admins
/cns/ @azure/acn-cns-reviewers
/cni/ @azure/acn-cni-reviewers
/dropgz/ @rbtr @camrynl @paulyufan2 @ashvindeodhar @thatmattlong
/npm/ @azure/acn-npm-reviewers
/zapai/ @rbtr @ZetaoZhuang
/bpf-prog/ @camrynl
/azure-ip-masq-merger/ @QxBytes @santhoshmprabhu
9 changes: 7 additions & 2 deletions .pipelines/templates/run-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ stages:
} 3>&1;
} | { read xs; exit $xs; }
} 4>&1

mv coverage-all.out linux-coverage.out

# combine coverage from multiple modules
(echo "mode: atomic"; tail -q -n +2 coverage-*.out) > coverage.cover
mv coverage.cover linux-coverage.out
retryCountOnTaskFailure: 3
name: "Test"
displayName: "Run Tests"
Expand Down Expand Up @@ -75,6 +77,9 @@ stages:
artifact: 'linux-coverage'
path: './'
- bash: |
# use go work to include multiple modules or gocov will omit results from those modules
make workspace

make tools
sudo ln -s $(pwd)/build/tools/bin/gocov /usr/local/bin/gocov
sudo ln -s $(pwd)/build/tools/bin/gocov-xml /usr/local/bin/gocov-xml
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ workspace: ## Set up the Go workspace.
go work init
go work use .
go work use ./azure-ipam
go work use ./azure-ip-masq-merger
go work use ./build/tools
go work use ./dropgz
go work use ./zapai
Expand All @@ -822,9 +823,11 @@ RESTART_CASE ?= false
# CNI type is a key to direct the types of state validation done on a cluster.
CNI_TYPE ?= cilium

test-all: ## run all unit tests.
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -race -covermode atomic -coverprofile=coverage-all.out $(COVER_PKG)/...
go tool cover -func=coverage-all.out
test-all: test-azure-ipam test-azure-ip-masq-merger test-main ## run all unit tests.

test-main:
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -race -covermode atomic -coverprofile=coverage-main.out $(COVER_PKG)/...
go tool cover -func=coverage-main.out

test-integration: ## run all integration tests.
AZURE_IPAM_VERSION=$(AZURE_IPAM_VERSION) \
Expand Down Expand Up @@ -855,10 +858,10 @@ test-extended-cyclonus: ## run the cyclonus test for npm.
cd ..

test-azure-ipam: ## run the unit test for azure-ipam
cd $(AZURE_IPAM_DIR) && go test
cd $(AZURE_IPAM_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ipam.out && go tool cover -func=../coverage-azure-ipam.out

test-azure-ip-masq-merger: ## run the unit test for azure-ip-masq-merger
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test
cd $(AZURE_IP_MASQ_MERGER_DIR) && go test -race -covermode atomic -coverprofile=../coverage-azure-ip-masq-merger.out && go tool cover -func=../coverage-azure-ip-masq-merger.out

kind:
kind create cluster --config ./test/kind/kind.yaml
Expand Down
Loading