WireMock.Net icon indicating copy to clipboard operation
WireMock.Net copied to clipboard

Wiremock.net Grpc Support for deep proto files

Open SushilMowade opened this issue 1 year ago • 5 comments

I have proto files

  1. ordres_services.proto
  2. orders_messages.proto
  3. orders_shared_messages.proto
  4. orders_enums.proto

orders_services.proto imports orders_messages.proto orders_messages.proto imports orders_shared_messages and orders_enum.proto also orders_messages.proto and orders_shared_shared.proto have multiple import of google protobufs e..g timestamp and more others.

also each proto file has package and namespace.

Does wiremock.net support such level of hiararchy. I always get Unimplemented exception.?

If i go with simple 2 files with no inner level import for other proto and goole probuff it works but not with complex hiarachy or more than 2 files.

Is wiremock.net fully compatible with grpc for .net.? Or are there any limitation for Grpc currently.

I am talking for .Net core.

SushilMowade avatar Aug 08 '24 12:08 SushilMowade

I don't think that multiple proto files are supported yet.

Did you try combining all files to 1 proto file?

StefH avatar Aug 08 '24 14:08 StefH

https://github.com/WireMock-Net/WireMock.Net/issues/1144

StefH avatar Aug 08 '24 19:08 StefH

We can not combine protos in one single file.. As we have existing code with many protos. So you are sure multiple proto file not supported by wiremock.net.

Also i observed when Package and namespace both are present in proto even single proto file greet example gives exception Unimplemented

SushilMowade avatar Aug 09 '24 02:08 SushilMowade

Hi Stef, Yes it works after combining all protos in single file. Thanks

But when i pushed this changes to azure CI pipeline. I am getting error as

"Service start failed with error: Unable to configure https endpoint. No server certificate was specified and the default developer cert could not be found"

SushilMowade avatar Aug 13 '24 11:08 SushilMowade

Are you using Azure Web App?

Maybe this link helps: https://github.com/WireMock-Net/WireMock.Net/wiki/Settings#certificatesettings

Or checkout other chapters on the wiki.

StefH avatar Aug 13 '24 15:08 StefH