diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2026-04-20 19:40:35 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <brad@danga.com> | 2026-04-20 13:33:10 -0700 |
| commit | 1e68a11721fd59408b68bce8be47ef77e3776572 (patch) | |
| tree | a8cc1f6a6b2bead34ebf6c06a2fe9a0b8626ac75 /control/controlhttp/controlhttpserver/controlhttpserver.go | |
| parent | 5b06e32f330a37bc26ac959e2541c271a6966e82 (diff) | |
| download | tailscale-1e68a11721fd59408b68bce8be47ef77e3776572.tar.xz tailscale-1e68a11721fd59408b68bce8be47ef77e3776572.zip | |
logtail: run HTTP tests in-memory with memnet + synctest
TestEncodeAndUploadMessages waited on the default 2s FlushDelay,
making the logtail package the slowest non-integration test in
the tree (~2s real time). Switch the shared harness from an
httptest.Server-on-loopback to a memnet.Listener-backed *http.Server
and run the tests inside synctest.Test, so fake time advances the
flush timer instantly.
Drops the net/http/httptest dependency from these tests. Combined
with the TestMain non-localhost dial guard added in the previous
commit, no test in this package can accidentally reach the real
log.tailscale.com server. Whole package now runs in ~7ms.
Updates tailscale/corp#28679
Change-Id: Ie0e7a6a79641384ed0eecb99d767e17cda8bb944
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'control/controlhttp/controlhttpserver/controlhttpserver.go')
0 files changed, 0 insertions, 0 deletions
