fix: trim both schemes

This commit is contained in:
Manuel de la Peña
2025-04-28 10:16:58 +02:00
parent 7f8afd2235
commit 7af98b421e

View File

@@ -139,8 +139,10 @@ func newTestStore(t testing.TB, opts ...testStoreOption) *Storage {
}
if settings.withAddress {
// trim the scheme from the URI
cfg.Addrs = []string{strings.TrimPrefix(uri, "redis://")}
// trim the schemes from the URI
addr := strings.TrimPrefix(uri, "redis://")
addr = strings.TrimPrefix(addr, "rediss://")
cfg.Addrs = []string{addr}
}
if settings.withURL {