Golang: testing http and grpc servers

HTTP server

is quite easy to test — here is a nice video about it:


https://youtu.be/hVFEV-ieeew

GRPC server

is a little bit trickier to test.
Here’s an example (it won’t compile, but the main idea is this):

That code was inspired by this answer — https://stackoverflow.com/a/52080545/801426

Similar Posts

LEAVE A COMMENT