test: expand Go fuzzing and raise coverage above 80%

- Add comprehensive runtime tests for session, docker watcher/stats/http, and server helpers
- Add new fuzz targets: FuzzToIntFromQuery and FuzzHTMLHelpers
- Add cmd/webterm main entrypoint test
- Expand helper conversion and color-mode coverage tests

Validation:
- go test ./...
- go test -race ./...
- All 15 fuzz targets pass with short fuzz runs
- go test ./... -coverpkg=./... => 80.9% total statement coverage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
GitHub Copilot
2026-02-14 17:06:52 +00:00
parent 5aa9eb9426
commit f597f8f99d
5 changed files with 898 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
package main
import (
"os"
"testing"
)
func TestMainVersionFlag(t *testing.T) {
orig := os.Args
defer func() { os.Args = orig }()
os.Args = []string{"webterm", "-v"}
main()
}