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
265fe434
Commit
265fe434
authored
May 28, 2014
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Azure tests
parent
838305e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
SSL.cs
StackExchange.Redis.Tests/SSL.cs
+36
-0
StackExchange.Redis.Tests.csproj
StackExchange.Redis.Tests/StackExchange.Redis.Tests.csproj
+1
-0
No files found.
StackExchange.Redis.Tests/SSL.cs
View file @
265fe434
...
...
@@ -13,6 +13,42 @@ namespace StackExchange.Redis.Tests
[
TestFixture
]
public
class
SSL
:
TestBase
{
[
Test
]
[
TestCase
(
null
,
true
)]
[
TestCase
(
null
,
false
)]
[
TestCase
(
6380
,
true
)]
[
TestCase
(
6379
,
false
)]
public
void
ConnectToAzure
(
int
?
port
,
bool
ssl
)
{
string
name
,
password
;
GetAzureCredentials
(
out
name
,
out
password
);
var
options
=
new
ConfigurationOptions
();
if
(
port
==
null
)
{
options
.
EndPoints
.
Add
(
name
+
".redis.cache.windows.net"
);
}
else
{
options
.
EndPoints
.
Add
(
name
+
".redis.cache.windows.net"
,
port
.
Value
);
}
options
.
Ssl
=
ssl
;
options
.
Password
=
password
;
Console
.
WriteLine
(
options
);
using
(
var
connection
=
ConnectionMultiplexer
.
Connect
(
options
))
{
var
ttl
=
connection
.
GetDatabase
().
Ping
();
Console
.
WriteLine
(
ttl
);
}
}
private
static
void
GetAzureCredentials
(
out
string
name
,
out
string
password
)
{
var
lines
=
File
.
ReadAllLines
(
@"d:\dev\azure.txt"
);
if
(
lines
==
null
||
lines
.
Length
!=
2
)
Assert
.
Inconclusive
(
"azure credentials missing"
);
name
=
lines
[
0
];
password
=
lines
[
1
];
}
[
Test
]
[
TestCase
(
false
,
false
)]
[
TestCase
(
true
,
false
)]
...
...
StackExchange.Redis.Tests/StackExchange.Redis.Tests.csproj
View file @
265fe434
...
...
@@ -20,6 +20,7 @@
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<PlatformTarget>
AnyCPU
</PlatformTarget>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "
>
<DebugType>
pdbonly
</DebugType>
...
...
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