fleet/server
Zach Wasserman efbc2b92bb
Fix race condition in updates test (#4661)
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
 ```
2022-03-18 09:30:45 -07:00
..
authz Refactor authz skip for device auth, add org_logo_url for frontend (#4619) 2022-03-16 10:15:25 -04:00
bindata Allow users to be readded if they were ever removed (#1945) 2021-09-07 13:33:40 -03:00
config make context type value header configurable (#4441) 2022-03-09 17:22:29 -05:00
contexts Refactor authz skip for device auth, add org_logo_url for frontend (#4619) 2022-03-16 10:15:25 -04:00
datastore Fix race condition in updates test (#4661) 2022-03-18 09:30:45 -07:00
errorstore Migrate team-related endpoints to new pattern (#3740) 2022-01-19 10:52:14 -05:00
fleet Add distributed discovery query support for detail queries, add orbit… (#4597) 2022-03-15 16:51:00 -03:00
health Fix documentation typos (#1682) 2017-12-21 18:37:32 -08:00
launcher Add distributed discovery query support for detail queries, add orbit… (#4597) 2022-03-15 16:51:00 -03:00
live_query Migrate team-related endpoints to new pattern (#3740) 2022-01-19 10:52:14 -05:00
logging make context type value header configurable (#4441) 2022-03-09 17:22:29 -05:00
mail update copyright year in core product transactional email templates (#3549) 2022-01-01 12:41:32 -06:00
mock Add distributed discovery query support for detail queries, add orbit… (#4597) 2022-03-15 16:51:00 -03:00
ptr Add CentOS parsing+post-processing to reduce false positives in vulnerability processing (#4037) 2022-02-14 15:13:44 -03:00
pubsub Migrate team-related endpoints to new pattern (#3740) 2022-01-19 10:52:14 -05:00
service Refactor authz skip for device auth, add org_logo_url for frontend (#4619) 2022-03-16 10:15:25 -04:00
sso Merge pull request from GHSA-ch68-7cf4-35vr 2022-02-02 15:50:09 -08:00
test Add hosts_count field to "list software" endpoint (#3873) 2022-01-26 09:47:56 -05:00
vulnerabilities Fix race in mock datastore for recent_vulns test (#4230) 2022-02-16 09:23:27 -05:00
webhooks Trigger webhooks for recently published vulnerabilities (#3941) 2022-02-02 16:34:37 -05:00
websocket Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
utils.go Modify /server/utils to handle all 2xx codes as POST success (#3534) 2021-12-30 16:00:10 -06:00