Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
48730b3f
Commit
48730b3f
authored
Jul 09, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added tests for #883
parent
80be84fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
SSL.cs
StackExchange.Redis.Tests/SSL.cs
+38
-0
No files found.
StackExchange.Redis.Tests/SSL.cs
View file @
48730b3f
...
...
@@ -298,5 +298,43 @@ public void SSLHostInferredFromEndpoints()
};
Assert
.
True
(
options
.
SslHost
==
null
);
}
[
Fact
]
public
void
SSLParseViaConfig_Issue883_ConfigObject
()
{
Skip
.
IfNoConfig
(
nameof
(
TestConfig
.
Config
.
AzureCacheServer
),
TestConfig
.
Current
.
AzureCacheServer
);
Skip
.
IfNoConfig
(
nameof
(
TestConfig
.
Config
.
AzureCachePassword
),
TestConfig
.
Current
.
AzureCachePassword
);
var
options
=
new
ConfigurationOptions
{
AbortOnConnectFail
=
false
,
Ssl
=
true
,
ConnectRetry
=
3
,
ConnectTimeout
=
5000
,
SyncTimeout
=
5000
,
DefaultDatabase
=
0
,
EndPoints
=
{
{
TestConfig
.
Current
.
AzureCacheServer
,
6380
}
},
Password
=
TestConfig
.
Current
.
AzureCachePassword
};
using
(
var
conn
=
ConnectionMultiplexer
.
Connect
(
options
))
{
conn
.
GetDatabase
().
Ping
();
}
}
[
Fact
]
public
void
SSLParseViaConfig_Issue883_ConfigString
()
{
Skip
.
IfNoConfig
(
nameof
(
TestConfig
.
Config
.
AzureCacheServer
),
TestConfig
.
Current
.
AzureCacheServer
);
Skip
.
IfNoConfig
(
nameof
(
TestConfig
.
Config
.
AzureCachePassword
),
TestConfig
.
Current
.
AzureCachePassword
);
var
configString
=
$"
{
TestConfig
.
Current
.
AzureCacheServer
}
:6380,password=
{
TestConfig
.
Current
.
AzureCachePassword
}
,connectRetry=3,connectTimeout=5000,syncTimeout=5000,defaultDatabase=0,ssl=true,abortConnect=false"
;
var
options
=
ConfigurationOptions
.
Parse
(
configString
);
using
(
var
conn
=
ConnectionMultiplexer
.
Connect
(
options
))
{
conn
.
GetDatabase
().
Ping
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment