snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
test / Lint (push) Failing after 3s
test / Test with Go 1.26.8 (push) Failing after 2s

This commit is contained in:
upstream-mirror
2026-09-16 01:17:21 +05:00
commit b352a9a30d
472 changed files with 108375 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package graphite
import (
"testing"
)
func TestPreparePathComponent(t *testing.T) {
testCases := []struct {
in, out string
}{
{in: "service", out: "service"},
{in: "service.local", out: "service_local"},
{in: "service.prod.", out: "service_prod_"},
{in: "приvет", out: "___v__"},
}
for _, tc := range testCases {
if want, got := tc.out, PreparePathComponent(tc.in); want != got {
t.Fatalf("error, got sanitized string %s, want %s", got, want)
}
}
}