Добавить X-Instance-Id, задержку drain при SIGTERM и отдельный запуск миграций

This commit is contained in:
2026-11-02 16:58:11 +03:00
parent 5b9f377783
commit 7fa8881eb3
21 changed files with 389 additions and 64 deletions
+12
View File
@@ -2,6 +2,7 @@ package ident_test
import (
"bytes"
"regexp"
"testing"
"time"
@@ -70,3 +71,14 @@ func TestParseRejectsNonCanonicalForms(t *testing.T) {
}
}
}
func TestNewAliasIs16HexAndRandom(t *testing.T) {
a, b := ident.NewAlias(), ident.NewAlias()
hex16 := regexp.MustCompile(`^[0-9a-f]{16}$`)
if !hex16.MatchString(a) || !hex16.MatchString(b) {
t.Fatalf("aliases %q, %q are not 16 lowercase hex characters", a, b)
}
if a == b {
t.Fatalf("two aliases are equal: %q", a)
}
}