package store import ( "strings" "testing" ) func TestNormalizeUsername(t *testing.T) { if got := NormalizeUsername(" Alice_1 "); got != "alice_1" { t.Fatalf("got %q", got) } } func TestPostgresDSNDefaultsSSLMode(t *testing.T) { in := "postgresql://user:pass@db.example.com:5432/postgres" out, err := postgresDSN(in) if err != nil { t.Fatal(err) } if !strings.Contains(out, "sslmode=verify-full") { t.Fatalf("missing default sslmode: %s", out) } }