p4lang / p4runtime

Specification documents for the P4Runtime control-plane API
Apache License 2.0
140 stars 86 forks source link

Generate mocks for the C++ grpc library. #390

Closed jonathan-dilorenzo closed 2 years ago

jonathan-dilorenzo commented 2 years ago

This change will cause Bazel to automatically generate mocks for testing various interactions with gRPC calls.

The only semantic difference is the generate_mocks = true, the rest is automatic reordering by my auto-formatter :'(.

We add and use this internally in Google, meaning that we can't open source some of our tests. I recently read that this should now be supported by Bazel.

jonathan-dilorenzo commented 2 years ago

I believe so, yeah. They are definitely automatically generated, but I'm never quite sure which subcomponents do what when I call build ;).