startSubprocess launches the test binary with the same flags as the test, but with additional flags added. See integration.ExecBackground for more details.
(t *testing.T, processName string, netNS *os.File, flags []string)
| 407 | // |
| 408 | // See integration.ExecBackground for more details. |
| 409 | func startSubprocess(t *testing.T, processName string, netNS *os.File, flags []string) (<-chan error, func() error) { |
| 410 | name := os.Args[0] |
| 411 | // Always use verbose mode since it gets piped to the parent test anyways. |
| 412 | args := append(os.Args[1:], append([]string{"-test.v=true"}, flags...)...) //nolint:gocritic |
| 413 | return integration.ExecBackground(t, processName, netNS, name, args) |
| 414 | } |
| 415 | |
| 416 | func writeDERPMapToFile(path string, derpMap *tailcfg.DERPMap) error { |
| 417 | f, err := os.Create(path) |
no test coverage detected