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
f9683881
Commit
f9683881
authored
Sep 04, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Sep 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses for ee/spec/lib/gitlab/geo/*
Fixes Rails/SaveBang cop for spec files
parent
ce32fa31
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
.rubocop_todo.yml
.rubocop_todo.yml
+0
-3
changelogs/unreleased/rails-save-bang-26.yml
changelogs/unreleased/rails-save-bang-26.yml
+5
-0
ee/spec/lib/gitlab/geo/cron_manager_spec.rb
ee/spec/lib/gitlab/geo/cron_manager_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/jwt_request_decoder_spec.rb
ee/spec/lib/gitlab/geo/jwt_request_decoder_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/oauth/session_spec.rb
ee/spec/lib/gitlab/geo/oauth/session_spec.rb
+2
-2
No files found.
.rubocop_todo.yml
View file @
f9683881
...
@@ -687,9 +687,6 @@ Rails/SaveBang:
...
@@ -687,9 +687,6 @@ Rails/SaveBang:
-
'
ee/spec/lib/gitlab/background_migration/fix_orphan_promoted_issues_spec.rb'
-
'
ee/spec/lib/gitlab/background_migration/fix_orphan_promoted_issues_spec.rb'
-
'
ee/spec/lib/gitlab/elastic/search_results_spec.rb'
-
'
ee/spec/lib/gitlab/elastic/search_results_spec.rb'
-
'
ee/spec/lib/gitlab/email/handler/ee/service_desk_handler_spec.rb'
-
'
ee/spec/lib/gitlab/email/handler/ee/service_desk_handler_spec.rb'
-
'
ee/spec/lib/gitlab/geo/cron_manager_spec.rb'
-
'
ee/spec/lib/gitlab/geo/jwt_request_decoder_spec.rb'
-
'
ee/spec/lib/gitlab/geo/oauth/session_spec.rb'
-
'
ee/spec/lib/gitlab/geo_spec.rb'
-
'
ee/spec/lib/gitlab/geo_spec.rb'
-
'
ee/spec/lib/gitlab/git_access_spec.rb'
-
'
ee/spec/lib/gitlab/git_access_spec.rb'
-
'
ee/spec/lib/gitlab/import_export/group/relation_factory_spec.rb'
-
'
ee/spec/lib/gitlab/import_export/group/relation_factory_spec.rb'
...
...
changelogs/unreleased/rails-save-bang-26.yml
0 → 100644
View file @
f9683881
---
title
:
Fix Rails/SaveBang offenses for ee/spec/lib/gitlab/geo/*
merge_request
:
41338
author
:
Rajendra Kadam
type
:
fixed
ee/spec/lib/gitlab/geo/cron_manager_spec.rb
View file @
f9683881
...
@@ -47,7 +47,7 @@ RSpec.describe Gitlab::Geo::CronManager, :geo do
...
@@ -47,7 +47,7 @@ RSpec.describe Gitlab::Geo::CronManager, :geo do
end
end
after
(
:all
)
do
after
(
:all
)
do
jobs
.
each
{
|
name
|
job
(
name
)
&
.
destroy
}
jobs
.
each
{
|
name
|
job
(
name
)
&
.
destroy
}
# rubocop: disable Rails/SaveBang
end
end
def
init_cron_job
(
job_name
,
class_name
)
def
init_cron_job
(
job_name
,
class_name
)
...
...
ee/spec/lib/gitlab/geo/jwt_request_decoder_spec.rb
View file @
f9683881
...
@@ -38,7 +38,7 @@ RSpec.describe Gitlab::Geo::JwtRequestDecoder do
...
@@ -38,7 +38,7 @@ RSpec.describe Gitlab::Geo::JwtRequestDecoder do
data
=
request
.
headers
[
'Authorization'
]
data
=
request
.
headers
[
'Authorization'
]
primary_node
.
secret_access_key
=
''
primary_node
.
secret_access_key
=
''
primary_node
.
save
primary_node
.
save
!
expect
(
described_class
.
new
(
data
).
decode
).
to
be_nil
expect
(
described_class
.
new
(
data
).
decode
).
to
be_nil
end
end
...
...
ee/spec/lib/gitlab/geo/oauth/session_spec.rb
View file @
f9683881
...
@@ -71,7 +71,7 @@ RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
...
@@ -71,7 +71,7 @@ RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
it
'includes primary relative URL path'
do
it
'includes primary relative URL path'
do
api_url
=
'http://localhost/relative-path/'
api_url
=
'http://localhost/relative-path/'
primary_node
.
update
(
url:
api_url
)
primary_node
.
update
!
(
url:
api_url
)
api_response
=
double
(
parsed:
true
)
api_response
=
double
(
parsed:
true
)
...
@@ -88,7 +88,7 @@ RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
...
@@ -88,7 +88,7 @@ RSpec.describe Gitlab::Geo::Oauth::Session, :geo do
context
'primary is configured with relative URL'
do
context
'primary is configured with relative URL'
do
it
"makes the request to a primary's relative URL"
do
it
"makes the request to a primary's relative URL"
do
response
=
ActiveSupport
::
JSON
.
encode
({
access_token:
'fake-token'
}.
as_json
)
response
=
ActiveSupport
::
JSON
.
encode
({
access_token:
'fake-token'
}.
as_json
)
primary_node
.
update
(
url:
'http://example.com/gitlab/'
)
primary_node
.
update
!
(
url:
'http://example.com/gitlab/'
)
api_url
=
"
#{
primary_node
.
internal_url
}
oauth/token"
api_url
=
"
#{
primary_node
.
internal_url
}
oauth/token"
stub_request
(
:post
,
api_url
).
to_return
(
stub_request
(
:post
,
api_url
).
to_return
(
...
...
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