Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/upload: split TestDates and remove
setup
We can use a bogus count files without affecting the test process's default count file or telemetry directory, by utilizing the new internal/regtest.RunProg. We no longer need to interact with the process-wide counter.Open for testing. Let's split this large TestDates into multiple tests. Each test and subtest interacts with a separate telemetry directory, so we don't need to worry about the files created or left by other test and subtest runs. Also, replace the testServer with httptest test server. That handles the server goroutine internally, and helps simplify the code flow. And, finally, we can remove the `setup` function. Change-Id: Id0a3057a702d4e3b93c60dfffd92fe402d817744 Reviewed-on: https://go-review.googlesource.com/c/telemetry/+/538297 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Robert Findley <[email protected]>
- Loading branch information