kube-ovn 核心 module 单元覆盖率

83 阅读1分钟

1. 生成cover.out 文件


go test ./pkg/ovs ./pkg/util ./pkg/ipam -gcflags=all=-l -p 1 -coverprofile=cover.out -covermode=atomic


2. 显示覆盖率


go tool cover -func=cover.out


go tool cover -html=cover.out -o cover.html