summaryrefslogtreecommitdiff
path: root/internal/flamegraph/webserver_timeout_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-06 15:35:24 +0200
committerPaul Buetow <paul@buetow.org>2026-03-06 15:35:24 +0200
commit99b02bf8c389a793df5d5986db05eed7e459f7b1 (patch)
treebc4e36cfcd3c9ef9b067beed2eb5b68a75a45aa2 /internal/flamegraph/webserver_timeout_test.go
parent4ff17c30120d657b966f8a55188ba167dc875e64 (diff)
refactor: remove web flamegrapher and keep TUI-only
Diffstat (limited to 'internal/flamegraph/webserver_timeout_test.go')
-rw-r--r--internal/flamegraph/webserver_timeout_test.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/internal/flamegraph/webserver_timeout_test.go b/internal/flamegraph/webserver_timeout_test.go
deleted file mode 100644
index c1df7e5..0000000
--- a/internal/flamegraph/webserver_timeout_test.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package flamegraph
-
-import (
- "net/http"
- "testing"
- "time"
-)
-
-func TestNewHTTPServerUsesConfiguredTimeouts(t *testing.T) {
- mux := http.NewServeMux()
- timeouts := serverTimeouts{
- readTimeout: 11 * time.Second,
- writeTimeout: 44 * time.Second,
- idleTimeout: 66 * time.Second,
- }
-
- srv := newHTTPServer(mux, timeouts)
-
- if srv.Handler != mux {
- t.Fatalf("Handler not set from mux")
- }
- if srv.ReadTimeout != timeouts.readTimeout {
- t.Fatalf("ReadTimeout = %v, want %v", srv.ReadTimeout, timeouts.readTimeout)
- }
- if srv.WriteTimeout != timeouts.writeTimeout {
- t.Fatalf("WriteTimeout = %v, want %v", srv.WriteTimeout, timeouts.writeTimeout)
- }
- if srv.IdleTimeout != timeouts.idleTimeout {
- t.Fatalf("IdleTimeout = %v, want %v", srv.IdleTimeout, timeouts.idleTimeout)
- }
-}
-
-func TestLiveServerWriteTimeoutIsLongerThanDefault(t *testing.T) {
- if liveServerTimeouts.readTimeout != defaultServerTimeouts.readTimeout {
- t.Fatalf("read timeout mismatch: live=%v default=%v", liveServerTimeouts.readTimeout, defaultServerTimeouts.readTimeout)
- }
- if liveServerTimeouts.idleTimeout != defaultServerTimeouts.idleTimeout {
- t.Fatalf("idle timeout mismatch: live=%v default=%v", liveServerTimeouts.idleTimeout, defaultServerTimeouts.idleTimeout)
- }
- if liveServerTimeouts.writeTimeout <= defaultServerTimeouts.writeTimeout {
- t.Fatalf("expected live write timeout > default write timeout, got live=%v default=%v", liveServerTimeouts.writeTimeout, defaultServerTimeouts.writeTimeout)
- }
-}