March 2021
Intermediate to advanced
260 pages
5h 45m
English
We’re ready to update our agent’s tests to test everything end-to-end: the client configuring the resolver and picker, the resolver discovering the servers, and the picker picking subconnections per RPC.
Open your agent tests in internal/agent/agent_test.go and add this import:
| | "github.com/travisjeffery/proglog/internal/loadbalance" |
Then update the client function to use your resolver and picker:
| | func client( |
| | t *testing.T, |
| | agent *agent.Agent, |
| | tlsConfig *tls.Config, |
| | ) api.LogClient { |
| | tlsCreds := credentials.NewTLS(tlsConfig) |
| | opts := []grpc.DialOption{ |
| | grpc.WithTransportCredentials(tlsCreds), ... |
Read now
Unlock full access