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
fc2b346c
Commit
fc2b346c
authored
May 23, 2017
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix return value when Geo nodes are not in sync
Relates to #2469
parent
3d4fc3dd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
lib/gitlab/geo/jwt_request_decoder.rb
lib/gitlab/geo/jwt_request_decoder.rb
+1
-0
spec/lib/gitlab/geo/jwt_request_decoder_spec.rb
spec/lib/gitlab/geo/jwt_request_decoder_spec.rb
+6
-0
No files found.
lib/gitlab/geo/jwt_request_decoder.rb
View file @
fc2b346c
...
...
@@ -42,6 +42,7 @@ module Gitlab
data
rescue
JWT
::
DecodeError
=>
e
Rails
.
logger
.
error
(
"Error decoding Geo request:
#{
e
}
"
)
return
end
end
...
...
spec/lib/gitlab/geo/jwt_request_decoder_spec.rb
View file @
fc2b346c
...
...
@@ -26,5 +26,11 @@ describe Gitlab::Geo::JwtRequestDecoder do
primary_node
.
save
expect
(
described_class
.
new
(
data
).
decode
).
to
be_nil
end
it
'returns nil when clocks are not in sync'
do
allow
(
JWT
).
to
receive
(
:decode
).
and_raise
(
JWT
::
InvalidIatError
)
expect
(
subject
.
decode
).
to
be_nil
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