merged from gramsrv upstream

This commit is contained in:
onysd 2026-09-01 12:06:31 +03:00
parent 79c64ee916
commit 21a0856587
651 changed files with 54774 additions and 4590 deletions

View file

@ -3,6 +3,8 @@ package loadharness
import (
"path/filepath"
"testing"
"telesrv/internal/domain"
)
func TestSessionDirectoryForManifestIsolatesNamedBundles(t *testing.T) {
@ -23,6 +25,14 @@ func TestSessionDirectoryForManifestIsolatesNamedBundles(t *testing.T) {
}
}
func TestDefaultProvisionPhonePrefixProducesCanonicalPossibleNumber(t *testing.T) {
cfg := ProvisionConfig{PhonePrefix: DefaultPhonePrefix, FirstNamePrefix: "Load"}
record := desiredSessionRecord(0, 0, 0, cfg)
if got, want := domain.NormalizePhone(record.Phone), "15550000001"; got != want {
t.Fatalf("normalized default phone = %q, want %q (wire %q)", got, want, record.Phone)
}
}
func TestDesiredSessionRecordUsesManifestNamespace(t *testing.T) {
cfg := ProvisionConfig{ManifestPath: filepath.Join("data", "manifest-500.json"), PhonePrefix: "+155500", FirstNamePrefix: "Load"}
record := desiredSessionRecord(12, 12, 1, cfg)