Hi team,
I'm creating a PoC with Service Weaver and some gRPC services, and for me, it's unclear how to call the APIs directly from the tests. The docs show how to test the components, but I cannot find an example of how to call the APIs from the root component.
I used to have something like this:
mux := http.NewServeMux()
server := httptest.NewUnstartedServer(mux)
server.EnableHTTP2 = true
userClient := userv1connect.NewUserServiceClient(server.Client(), server.URL)
And then I could call the userClient.SomeRoute inside my tests. Where SomeRoute is defined as a method of the root component.
So, how can I test the root component, including its handlers?