MCPcopy
hub / github.com/grpc/grpc-go / configureResources

Function configureResources

internal/xds/resolver/helpers_test.go:258–270  ·  view source on GitHub ↗

Updates all resources on the given management server.

(ctx context.Context, t *testing.T, mgmtServer *e2e.ManagementServer, nodeID string, listeners []*v3listenerpb.Listener, routes []*v3routepb.RouteConfiguration, clusters []*v3clusterpb.Cluster, endpoints []*v3endpointpb.ClusterLoadAssignment)

Source from the content-addressed store, hash-verified

256
257// Updates all resources on the given management server.
258func configureResources(ctx context.Context, t *testing.T, mgmtServer *e2e.ManagementServer, nodeID string, listeners []*v3listenerpb.Listener, routes []*v3routepb.RouteConfiguration, clusters []*v3clusterpb.Cluster, endpoints []*v3endpointpb.ClusterLoadAssignment) {
259 resources := e2e.UpdateOptions{
260 NodeID: nodeID,
261 Listeners: listeners,
262 Routes: routes,
263 Clusters: clusters,
264 Endpoints: endpoints,
265 SkipValidation: true,
266 }
267 if err := mgmtServer.Update(ctx, resources); err != nil {
268 t.Fatal(err)
269 }
270}
271
272// waitForResourceNames waits for the wantNames to be pushed on to namesCh.
273// Fails the test by calling t.Fatal if the context expires before that.

Calls 2

UpdateMethod · 0.65
FatalMethod · 0.65

Tested by

no test coverage detected