mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
d0cde1aaaa
* Use the same HTTP server config as the production server in tests This abstracts the default config we use to run the server into a function so it can be used in tests to run an HTTP server using the same configuration. Additionally, this fixes a data race in tests, as an HTTP server configuration can't be changed once you call `server.Start()`[1] [1]: https://cs.opensource.google/go/go/+/refs/tags/go1.19.2:src/net/http/httptest/server.go;l=40;drc=19309779ac5e2f5a2fd3cbb34421dafb2855ac21 |
||
---|---|---|
.. | ||
config_test.go | ||
config.go |