package server
import (
"io"
"log/slog"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
"strings"
"testing"
"daum.dev/showcase/internal/config"
)
func testServer(t *testing.T, ready bool) *Server {
t.Helper()
root := t.TempDir()
files := map[string]string{
"index.html": "home",
"repos/index.html": "all repos",
"404.html": "
not found
",
"static/style.css": "body{}",
"static/fonts/x.woff2": "font",
"repo-a/index.html": "repo page",
"repo-a/tree/docs/index.html": "docs dir",
"repo-a/blob/main.go.html": "main.go page",
"repo-a/raw/main.go": "package main",
"repo-a/raw/logo.png": "\x89PNG",
"repo-a/raw/evil.svg": "