Skip to content

Commit

Permalink
internal/upload: split TestDates and remove setup
Browse files Browse the repository at this point in the history
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
hyangah committed Dec 22, 2023
1 parent f040a5a commit 12200b8
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 267 deletions.
Loading

0 comments on commit 12200b8

Please sign in to comment.