package metrics import "testing" func TestNormalizePath(t *testing.T) { tests := []struct { input string expected string }{ // Keys {"/keys/550e8400-e29b-41d4-a716-446655440000", "/keys/{id}"}, {"/keys", "/keys"}, // Projects {"/projects/pantheon", "/projects/{id}"}, {"/projects/pantheon/claude", "/projects/{id}/claude"}, {"/projects/aeries/shell", "/projects/{id}/shell"}, {"/projects/test-123/events", "/projects/{id}/events"}, // Claude config {"/projects/pantheon/claude-config/commands/deploy", "/projects/{id}/claude-config/commands/{name}"}, {"/projects/pantheon/claude-config/skills/go-testing", "/projects/{id}/claude-config/skills/{name}"}, {"/projects/pantheon/claude-config/agents/reviewer", "/projects/{id}/claude-config/agents/{name}"}, {"/projects/pantheon/claude-config/commands", "/projects/{id}/claude-config/commands"}, {"/projects/pantheon/claude-config", "/projects/{id}/claude-config"}, // Unchanged {"/health", "/health"}, {"/ready", "/ready"}, {"/metrics", "/metrics"}, {"/docs", "/docs"}, } for _, tt := range tests { t.Run(tt.input, func(t *testing.T) { result := normalizePath(tt.input) if result != tt.expected { t.Errorf("normalizePath(%q) = %q, want %q", tt.input, result, tt.expected) } }) } }