Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 4e1178d

Browse files
committed
Add test to connect to ssl server with urlencoded password
1 parent 72d4e24 commit 4e1178d

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

tests/ServiceStack.Redis.Tests/SslTests.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,30 @@ public void Can_connect_to_ssl_azure_redis()
5555
}
5656

5757
[Test]
58-
public void Can_connect_to_ssl_azure_redis_with_PooledClientsManager()
58+
public void Can_connect_to_ssl_azure_redis_with_UrlFormat()
5959
{
60-
using (var redisManager = new PooledRedisClientManager(connectionString))
61-
using (var client = redisManager.GetClient())
60+
var url = "redis://{0}?ssl=true&password={1}".Fmt(Host, Password.UrlEncode());
61+
using (var client = new RedisClient(url))
6262
{
6363
client.Set("foo", "bar");
6464
var foo = client.GetValue("foo");
6565
foo.Print();
6666
}
6767
}
6868

69+
[Test]
70+
public void Can_connect_to_ssl_azure_redis_with_PooledClientsManager()
71+
{
72+
using (var redisManager = new PooledRedisClientManager(connectionString))
73+
using (var client1 = redisManager.GetClient())
74+
using (var client2 = redisManager.GetClient())
75+
{
76+
client1.Set("foo", "bar");
77+
var foo = client2.GetValue("foo");
78+
foo.Print();
79+
}
80+
}
81+
6982
[Test]
7083
public void Can_connect_to_NetworkStream()
7184
{

0 commit comments

Comments
 (0)