MCPcopy Index your code
hub / github.com/coder/coder / startClientSubprocess

Function startClientSubprocess

tailnet/test/integration/integration_test.go:383–403  ·  view source on GitHub ↗
(t *testing.T, topologyName string, networking integration.TestNetworking, me integration.Client, derpMapPath string)

Source from the content-addressed store, hash-verified

381}
382
383func startClientSubprocess(t *testing.T, topologyName string, networking integration.TestNetworking, me integration.Client, derpMapPath string) (<-chan error, func() error) {
384 var (
385 clientName = fmt.Sprintf("client%d", me.Number)
386 clientProcessConfig = networking.Client1
387 )
388 if me.Number == integration.ClientNumber2 {
389 clientProcessConfig = networking.Client2
390 }
391
392 flags := []string{
393 "--subprocess",
394 "--test-name=" + topologyName,
395 "--role=client",
396 "--client-name=" + clientName,
397 "--client-number=" + strconv.Itoa(int(me.Number)),
398 "--client-server-url=" + clientProcessConfig.ServerAccessURL,
399 "--client-derp-map-path=" + derpMapPath,
400 }
401
402 return startSubprocess(t, clientName, clientProcessConfig.Process.NetNS, flags)
403}
404
405// startSubprocess launches the test binary with the same flags as the test, but
406// with additional flags added.

Callers 1

TestIntegrationFunction · 0.85

Calls 1

startSubprocessFunction · 0.85

Tested by

no test coverage detected