maxbrunsfeld / counterfeiter

A tool for generating self-contained, type-safe test doubles in go
MIT License
931 stars 90 forks source link

Counterfeiter does not generate private interface methods (used in `grpc-go`) #256

Closed bkosm closed 10 months ago

bkosm commented 10 months ago

We have a case where we generate a mock for an entire gRPC server.

All server interfaces generated through protoc require a private method mustEmbedUnimplementedXServer now, as stated in this thread (https://github.com/grpc/grpc-go/issues/3794#issuecomment-669255737).

Are there any plans to support such a case?


It might be a nuisance, but supporting something as big as grpc-go could be in the best interest of the library.

As an MVP even blank implementation of private methods without params and return types would be reasonable and solve the problem of some part of your users.

bkosm commented 10 months ago

I just learned that it would not change anything due to Type cannot implement 'OrganisationsServer' as it has a non-exported method and is defined in a different package.