From 99b02bf8c389a793df5d5986db05eed7e459f7b1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 6 Mar 2026 15:35:24 +0200 Subject: refactor: remove web flamegrapher and keep TUI-only --- internal/flamegraph/webserver_autoreload_test.go | 37 ------------------------ 1 file changed, 37 deletions(-) delete mode 100644 internal/flamegraph/webserver_autoreload_test.go (limited to 'internal/flamegraph/webserver_autoreload_test.go') diff --git a/internal/flamegraph/webserver_autoreload_test.go b/internal/flamegraph/webserver_autoreload_test.go deleted file mode 100644 index ed4c907..0000000 --- a/internal/flamegraph/webserver_autoreload_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package flamegraph - -import ( - "net/http/httptest" - "strings" - "testing" - "time" -) - -func TestBuildSVGAutoReloadHandlerServesViewerPage(t *testing.T) { - mux := buildSVGAutoReloadHandler("/tmp/fake.svg", "/tmp/fake.svg", 2*time.Second) - - rec := httptest.NewRecorder() - req := httptest.NewRequest("GET", "http://localhost/", nil) - mux.ServeHTTP(rec, req) - - if rec.Code != 200 { - t.Fatalf("status code = %d, want 200", rec.Code) - } - if got := rec.Header().Get("Content-Type"); !strings.HasPrefix(got, "text/html") { - t.Fatalf("content type = %q, want text/html", got) - } - body := rec.Body.String() - if !strings.Contains(body, "Auto-refresh every 2000 ms.") { - t.Fatalf("viewer page missing refresh interval, body=%q", body) - } - if !strings.Contains(body, `id="fg"`) { - t.Fatalf("viewer page missing iframe, body=%q", body) - } -} - -func TestServeSVGAutoReloadRejectsNonPositiveInterval(t *testing.T) { - err := ServeSVGAutoReload("ignored.svg", 0) - if err == nil { - t.Fatal("expected error for non-positive interval") - } -} -- cgit v1.2.3