mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 06:48:54 +00:00
Copy the DefaultOptions in order to prevent a data race on the Targets
map. This race should only have effected testing.
Race detector output:
```
WARNING: DATA RACE
Read at 0x00c0000908d0 by goroutine 15:
runtime.mapaccess1_faststr()
/opt/hostedtoolcache/go/1.18.0/x64/src/runtime/map_faststr.go:13 +0x0
github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath.func1()
/home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:58 +0xb6
testing.tRunner()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x47
Previous write at 0x00c0000908d0 by goroutine 12:
runtime.mapassign_faststr()
/opt/hostedtoolcache/go/1.18.0/x64/src/runtime/map_faststr.go:203 +0x0
github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath.func1()
/home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:62 +0x1cb
testing.tRunner()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x47
Goroutine 15 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x724
github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath()
/home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:53 +0x1a4
testing.tRunner()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x47
Goroutine 12 (running) created at:
testing.(*T).Run()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486 +0x724
github.com/fleetdm/fleet/v4/orbit/pkg/update.TestMakeRepoPath()
/home/runner/work/fleet/fleet/orbit/pkg/update/update_test.go:53 +0x1a4
testing.tRunner()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1439 +0x213
testing.(*T).Run.func1()
/opt/hostedtoolcache/go/1.18.0/x64/src/testing/testing.go:1486
+0x47
```
|
||
|---|---|---|
| .. | ||
| authz | ||
| bindata | ||
| config | ||
| contexts | ||
| datastore | ||
| errorstore | ||
| fleet | ||
| health | ||
| launcher | ||
| live_query | ||
| logging | ||
| mock | ||
| ptr | ||
| pubsub | ||
| service | ||
| sso | ||
| test | ||
| vulnerabilities | ||
| webhooks | ||
| websocket | ||
| utils.go | ||