While code coverage is not the best metric for how good our tests are, it is a metric. Our current code coverage for the xdsclient is average. Attempting to improve this will help improve our tests and could uncover some interesting bugs.
easwars@easwars-macbookpro3:grpc-go $ go test google.golang.org/grpc/xds/internal/xdsclient/... -coverprofile=/tmp/coverage.out
ok google.golang.org/grpc/xds/internal/xdsclient 3.054s coverage: 70.8% of statements
ok google.golang.org/grpc/xds/internal/xdsclient/bootstrap 0.293s coverage: 81.6% of statements
ok google.golang.org/grpc/xds/internal/xdsclient/controller 1.748s coverage: 60.4% of statements
? google.golang.org/grpc/xds/internal/xdsclient/controller/version [no test files]
? google.golang.org/grpc/xds/internal/xdsclient/controller/version/v2 [no test files]
? google.golang.org/grpc/xds/internal/xdsclient/controller/version/v3 [no test files]
ok google.golang.org/grpc/xds/internal/xdsclient/e2e_test 0.944s coverage: [no statements]
ok google.golang.org/grpc/xds/internal/xdsclient/load 0.165s coverage: 92.6% of statements
? google.golang.org/grpc/xds/internal/xdsclient/pubsub [no test files]
ok google.golang.org/grpc/xds/internal/xdsclient/xdsresource 0.518s coverage: 86.8% of statements
? google.golang.org/grpc/xds/internal/xdsclient/xdsresource/version [no test files]
While code coverage is not the best metric for how good our tests are, it is a metric. Our current code coverage for the xdsclient is average. Attempting to improve this will help improve our tests and could uncover some interesting bugs.