feat: process attachments through durable versioned jobs

This commit is contained in:
Vladislav Agapov
2026-10-29 16:56:06 +03:00
parent 276dbdad8a
commit e35c8f0b75
235 changed files with 17028 additions and 44 deletions
@@ -0,0 +1,38 @@
package fiber
import (
"net/http"
"testing"
"time"
"github.com/valyala/fasthttp"
)
// TestMetricsBoundUnknownMethods keeps arbitrary client methods out of metric labels.
func TestMetricsBoundUnknownMethods(t *testing.T) {
ctrl := testController(t, nil)
raw := &fasthttp.RequestCtx{}
raw.Request.Header.SetMethod("CUSTOM_RANDOM_METHOD")
raw.Response.SetStatusCode(http.StatusTemporaryRedirect)
ctx := ctrl.server.AcquireCtx(raw)
defer ctrl.server.ReleaseCtx(ctx)
ctrl.metrics.observe(ctx, time.Millisecond)
families, err := ctrl.metrics.registry.Gather()
if err != nil {
t.Fatal(err)
}
found := false
for _, family := range families {
for _, metric := range family.Metric {
for _, label := range metric.Label {
if label.GetValue() == "CUSTOM_RANDOM_METHOD" {
t.Fatal("unbounded method label")
}
found = found || label.GetValue() == "other"
}
}
}
if !found {
t.Fatal("unknown method was not grouped")
}
}