Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-workhorse
Commits
9f2c04d2
Commit
9f2c04d2
authored
Mar 13, 2017
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sentinel config parsing test
parent
1e92a032
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
internal/redis/redis_test.go
internal/redis/redis_test.go
+6
-6
No files found.
internal/redis/redis_test.go
View file @
9f2c04d2
...
@@ -100,19 +100,19 @@ func TestSentinelConnNoSentinel(t *testing.T) {
...
@@ -100,19 +100,19 @@ func TestSentinelConnNoSentinel(t *testing.T) {
}
}
func
TestSentinelConnTwoURLs
(
t
*
testing
.
T
)
{
func
TestSentinelConnTwoURLs
(
t
*
testing
.
T
)
{
urls
:=
[]
string
{
"tcp://10.0.0.1:12345"
,
"tcp://
10.0.0.2:12345"
}
addrs
:=
[]
string
{
"10.0.0.1:12345"
,
"
10.0.0.2:12345"
}
var
sentinelUrls
[]
config
.
TomlURL
var
sentinelUrls
[]
config
.
TomlURL
for
_
,
url
:=
range
url
s
{
for
_
,
a
:=
range
addr
s
{
parsedURL
:=
helper
.
URLMustParse
(
url
)
parsedURL
:=
helper
.
URLMustParse
(
`tcp://`
+
a
)
sentinelUrls
=
append
(
sentinelUrls
,
config
.
TomlURL
{
URL
:
*
parsedURL
})
sentinelUrls
=
append
(
sentinelUrls
,
config
.
TomlURL
{
URL
:
*
parsedURL
})
}
}
s
:=
sentinelConn
(
"foobar"
,
sentinelUrls
)
s
:=
sentinelConn
(
"foobar"
,
sentinelUrls
)
assert
.
Equal
(
t
,
len
(
url
s
),
len
(
s
.
Addrs
))
assert
.
Equal
(
t
,
len
(
addr
s
),
len
(
s
.
Addrs
))
for
i
:=
range
url
s
{
for
i
:=
range
addr
s
{
assert
.
Equal
(
t
,
url
s
[
i
],
s
.
Addrs
[
i
])
assert
.
Equal
(
t
,
addr
s
[
i
],
s
.
Addrs
[
i
])
}
}
}
}
...
...
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