MCPcopy Create free account
hub / github.com/buggregator/server / TestExtractProject

Function TestExtractProject

modules/sentry/handler_test.go:163–181  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestExtractProject(t *testing.T) {
164 tests := []struct {
165 path string
166 want string
167 }{
168 {"/api/myproject/store", "myproject"},
169 {"/api/123/envelope", "123"},
170 {"/", ""},
171 {"/api", ""},
172 }
173
174 for _, tt := range tests {
175 t.Run(tt.path, func(t *testing.T) {
176 if got := extractProject(tt.path); got != tt.want {
177 t.Errorf("extractProject(%q) = %q, want %q", tt.path, got, tt.want)
178 }
179 })
180 }
181}
182
183func TestResolveProject(t *testing.T) {
184 tests := []struct {

Callers

nothing calls this directly

Calls 2

extractProjectFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected