Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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-ce
Commits
e5b07e73
Commit
e5b07e73
authored
Aug 12, 2021
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix be assertion to be eq assertion in spec
parent
47727d35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
spec/lib/gitlab/database/load_balancing_spec.rb
spec/lib/gitlab/database/load_balancing_spec.rb
+4
-4
No files found.
spec/lib/gitlab/database/load_balancing_spec.rb
View file @
e5b07e73
...
...
@@ -300,7 +300,7 @@ RSpec.describe Gitlab::Database::LoadBalancing do
let
(
:connection
)
{
ActiveRecord
::
Base
.
connection
}
it
'returns primary'
do
expect
(
described_class
.
db_role_for_connection
(
connection
)).
to
be
(
:primary
)
expect
(
described_class
.
db_role_for_connection
(
connection
)).
to
eq
(
:primary
)
end
end
...
...
@@ -310,14 +310,14 @@ RSpec.describe Gitlab::Database::LoadBalancing do
context
'when a proxy connection is used'
do
it
'returns :unknown'
do
expect
(
described_class
.
db_role_for_connection
(
proxy
)).
to
be
(
:unknown
)
expect
(
described_class
.
db_role_for_connection
(
proxy
)).
to
eq
(
:unknown
)
end
end
context
'when a read connection is used'
do
it
'returns :replica'
do
proxy
.
load_balancer
.
read
do
|
connection
|
expect
(
described_class
.
db_role_for_connection
(
connection
)).
to
be
(
:replica
)
expect
(
described_class
.
db_role_for_connection
(
connection
)).
to
eq
(
:replica
)
end
end
end
...
...
@@ -325,7 +325,7 @@ RSpec.describe Gitlab::Database::LoadBalancing do
context
'when a read_write connection is used'
do
it
'returns :primary'
do
proxy
.
load_balancer
.
read_write
do
|
connection
|
expect
(
described_class
.
db_role_for_connection
(
connection
)).
to
be
(
:primary
)
expect
(
described_class
.
db_role_for_connection
(
connection
)).
to
eq
(
:primary
)
end
end
end
...
...
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