prometheus/storage/remote
Leonardo Zamariola 3326df42bb
Removing global state modification on unit tests (fix #10033 #10034) (#10935)
* Removing global state modification on unit tests (fix #10033 #10034)

The config.DefaultRemoteReadConfig and config.DefaultRemoteWriteConfig
instances hold global state. Unit tests were changing their url.URL reference
globally causing false positives when tests were ran through package.
Two helper functions were created to copy those global values instead of changing
them in place to fix null point when running unit tests by method instead of
by package.

Signed-off-by: Leonardo Zamariola <leonardo.zamariola@gmail.com>

* Fixing pull request suggestions

Copying by value from default config

Signed-off-by: Leonardo Zamariola <leonardo.zamariola@gmail.com>
2022-06-30 10:20:16 -06:00
..
chunked.go Fix some warnings: 'redundant type from array, slice, or map composite literal' (#7109) 2020-04-15 11:17:41 +01:00
chunked_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
client.go refactor: move from io/ioutil to io and os packages (#10528) 2022-04-27 11:24:36 +02:00
client_test.go tests: Move from t.Errorf and others. (Part 2) (#9309) 2021-09-13 21:19:20 +02:00
codec.go refactor: move from io/ioutil to io and os packages (#10528) 2022-04-27 11:24:36 +02:00
codec_test.go storage: expose bug in iterators #10027 2021-12-16 12:02:15 +01:00
ewma.go Replace sync/atomic with uber-go/atomic (#7683) 2020-07-30 13:15:42 +05:30
intern.go Move away from testutil, refactor imports (#8087) 2020-10-22 11:00:08 +02:00
intern_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
max_timestamp.go Remote: Do not collect non-initialized timestamp metrics (#8060) 2020-10-15 23:53:59 +02:00
metadata_watcher.go Fix imports formatting 2021-11-02 19:52:34 +01:00
metadata_watcher_test.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
queue_manager.go Remote Write: Rename confusing walDir parameter to dir (#10464) 2022-05-30 21:45:30 -07:00
queue_manager_test.go Removing global state modification on unit tests (fix #10033 #10034) (#10935) 2022-06-30 10:20:16 -06:00
read.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
read_handler.go Move packages out of deprecated pkg directory 2021-11-09 08:03:10 +01:00
read_handler_test.go unit tests: make all Labels sorted alphabetically (#10532) 2022-05-04 23:41:36 +02:00
read_test.go unit tests: make all Labels sorted alphabetically (#10532) 2022-05-04 23:41:36 +02:00
storage.go Add an option to use the external labels as selectors for the remote read endpoint (#10254) 2022-02-16 22:12:47 +01:00
storage_test.go Removing global state modification on unit tests (fix #10033 #10034) (#10935) 2022-06-30 10:20:16 -06:00
write.go Remote Write: Rename confusing walDir parameter to dir (#10464) 2022-05-30 21:45:30 -07:00
write_handler.go Log time series details for out-of-order samples in remote write receiver (#9894) 2021-12-08 15:07:51 +00:00
write_handler_test.go refactor: move from io/ioutil to io and os packages (#10528) 2022-04-27 11:24:36 +02:00
write_test.go Removing global state modification on unit tests (fix #10033 #10034) (#10935) 2022-06-30 10:20:16 -06:00