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
cebfe79a
Commit
cebfe79a
authored
Jan 24, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[EE] Address offenses to the Layout/ExtraSpacing cop
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
a7dfb619
Changes
74
Hide whitespace changes
Inline
Side-by-side
Showing
74 changed files
with
96 additions
and
96 deletions
+96
-96
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-1
ee/app/helpers/ee/gitlab_routing_helper.rb
ee/app/helpers/ee/gitlab_routing_helper.rb
+1
-1
ee/app/models/approver.rb
ee/app/models/approver.rb
+1
-1
ee/app/models/approver_group.rb
ee/app/models/approver_group.rb
+1
-1
ee/app/models/draft_note.rb
ee/app/models/draft_note.rb
+1
-1
ee/app/models/ee/appearance.rb
ee/app/models/ee/appearance.rb
+2
-2
ee/app/models/ee/epic.rb
ee/app/models/ee/epic.rb
+1
-1
ee/app/models/ee/user.rb
ee/app/models/ee/user.rb
+1
-1
ee/app/models/geo/project_registry.rb
ee/app/models/geo/project_registry.rb
+1
-1
ee/app/models/geo_node.rb
ee/app/models/geo_node.rb
+2
-2
ee/app/services/ee/ci/register_job_service.rb
ee/app/services/ee/ci/register_job_service.rb
+1
-1
ee/app/views/groups/analytics/show.html.haml
ee/app/views/groups/analytics/show.html.haml
+1
-1
ee/app/views/groups/security/dashboard/show.html.haml
ee/app/views/groups/security/dashboard/show.html.haml
+1
-1
ee/app/views/projects/feature_flags/index.html.haml
ee/app/views/projects/feature_flags/index.html.haml
+1
-1
ee/app/views/users/_custom_project_templates.html.haml
ee/app/views/users/_custom_project_templates.html.haml
+1
-1
ee/app/views/users/_custom_project_templates_from_groups.html.haml
...ews/users/_custom_project_templates_from_groups.html.haml
+1
-1
ee/db/migrate/20180626171125_add_feature_flags_to_projects.rb
...b/migrate/20180626171125_add_feature_flags_to_projects.rb
+1
-1
ee/db/migrate/20180917171533_create_vulnerability_occurrences.rb
...igrate/20180917171533_create_vulnerability_occurrences.rb
+1
-1
ee/db/migrate/20180930171532_recreate_vulnerability_occurrences_and_vulnerability_occurrence_identifiers.rb
...y_occurrences_and_vulnerability_occurrence_identifiers.rb
+2
-2
ee/db/migrate/20181004131020_change_vuln_occurrence_columns.rb
.../migrate/20181004131020_change_vuln_occurrence_columns.rb
+2
-2
ee/lib/api/managed_licenses.rb
ee/lib/api/managed_licenses.rb
+1
-1
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+1
-1
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+1
-1
ee/lib/tasks/gitlab/elastic.rake
ee/lib/tasks/gitlab/elastic.rake
+2
-2
ee/spec/controllers/groups/epics_controller_spec.rb
ee/spec/controllers/groups/epics_controller_spec.rb
+1
-1
ee/spec/controllers/groups/security/vulnerabilities_controller_spec.rb
...ollers/groups/security/vulnerabilities_controller_spec.rb
+2
-2
ee/spec/controllers/projects/issues_controller_spec.rb
ee/spec/controllers/projects/issues_controller_spec.rb
+1
-1
ee/spec/controllers/unsubscribes_controller_spec.rb
ee/spec/controllers/unsubscribes_controller_spec.rb
+1
-1
ee/spec/factories/geo/project_registry.rb
ee/spec/factories/geo/project_registry.rb
+1
-1
ee/spec/factories/vulnerabilities/occurrences.rb
ee/spec/factories/vulnerabilities/occurrences.rb
+1
-1
ee/spec/features/epics/todo_spec.rb
ee/spec/features/epics/todo_spec.rb
+2
-2
ee/spec/features/groups/group_settings_spec.rb
ee/spec/features/groups/group_settings_spec.rb
+2
-2
ee/spec/features/issues/csv_spec.rb
ee/spec/features/issues/csv_spec.rb
+1
-1
ee/spec/features/projects/pipelines/pipeline_spec.rb
ee/spec/features/projects/pipelines/pipeline_spec.rb
+1
-1
ee/spec/features/promotion_spec.rb
ee/spec/features/promotion_spec.rb
+1
-1
ee/spec/finders/epics_finder_spec.rb
ee/spec/finders/epics_finder_spec.rb
+2
-2
ee/spec/lib/gitlab/auth/smartcard/certificate_spec.rb
ee/spec/lib/gitlab/auth/smartcard/certificate_spec.rb
+1
-1
ee/spec/lib/gitlab/auth_spec.rb
ee/spec/lib/gitlab/auth_spec.rb
+1
-1
ee/spec/lib/gitlab/elastic/indexer_spec.rb
ee/spec/lib/gitlab/elastic/indexer_spec.rb
+1
-1
ee/spec/lib/gitlab/git_access_wiki_spec.rb
ee/spec/lib/gitlab/git_access_wiki_spec.rb
+1
-1
ee/spec/lib/system_check/geo/http_clone_enabled_check_spec.rb
...pec/lib/system_check/geo/http_clone_enabled_check_spec.rb
+2
-2
ee/spec/migrations/delete_inconsistent_internal_id_records_spec.rb
...igrations/delete_inconsistent_internal_id_records_spec.rb
+1
-1
ee/spec/migrations/migrate_mirror_attributes_data_from_projects_to_import_state_spec.rb
...ror_attributes_data_from_projects_to_import_state_spec.rb
+1
-1
ee/spec/models/application_setting_spec.rb
ee/spec/models/application_setting_spec.rb
+1
-1
ee/spec/models/ci/bridge_spec.rb
ee/spec/models/ci/bridge_spec.rb
+1
-1
ee/spec/models/ee/environment_spec.rb
ee/spec/models/ee/environment_spec.rb
+1
-1
ee/spec/models/epic_spec.rb
ee/spec/models/epic_spec.rb
+1
-1
ee/spec/models/geo/every_geo_event_spec.rb
ee/spec/models/geo/every_geo_event_spec.rb
+1
-1
ee/spec/models/geo_node_status_spec.rb
ee/spec/models/geo_node_status_spec.rb
+2
-2
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+1
-1
ee/spec/requests/api/epic_issues_spec.rb
ee/spec/requests/api/epic_issues_spec.rb
+1
-1
ee/spec/requests/api/geo_nodes_spec.rb
ee/spec/requests/api/geo_nodes_spec.rb
+1
-1
ee/spec/requests/api/ldap_group_links_spec.rb
ee/spec/requests/api/ldap_group_links_spec.rb
+1
-1
ee/spec/requests/api/license_spec.rb
ee/spec/requests/api/license_spec.rb
+1
-1
ee/spec/requests/api/merge_requests_spec.rb
ee/spec/requests/api/merge_requests_spec.rb
+1
-1
ee/spec/requests/api/project_push_rule_spec.rb
ee/spec/requests/api/project_push_rule_spec.rb
+1
-1
ee/spec/requests/smartcard_controller_spec.rb
ee/spec/requests/smartcard_controller_spec.rb
+1
-1
ee/spec/serializers/epic_entity_spec.rb
ee/spec/serializers/epic_entity_spec.rb
+2
-2
ee/spec/services/ee/boards/issues/list_service_spec.rb
ee/spec/services/ee/boards/issues/list_service_spec.rb
+2
-2
ee/spec/services/ee/boards/issues/move_service_spec.rb
ee/spec/services/ee/boards/issues/move_service_spec.rb
+3
-3
ee/spec/services/epics/update_service_spec.rb
ee/spec/services/epics/update_service_spec.rb
+1
-1
ee/spec/services/geo/file_download_service_spec.rb
ee/spec/services/geo/file_download_service_spec.rb
+1
-1
ee/spec/services/geo/repository_updated_event_store_spec.rb
ee/spec/services/geo/repository_updated_event_store_spec.rb
+1
-1
ee/spec/services/projects/gitlab_projects_import_service_spec.rb
.../services/projects/gitlab_projects_import_service_spec.rb
+1
-1
ee/spec/services/projects/slack_application_install_service_spec.rb
...rvices/projects/slack_application_install_service_spec.rb
+1
-1
ee/spec/services/todo_service_spec.rb
ee/spec/services/todo_service_spec.rb
+1
-1
ee/spec/services/users/migrate_to_ghost_user_service_spec.rb
ee/spec/services/users/migrate_to_ghost_user_service_spec.rb
+2
-2
lib/tasks/gitlab/cleanup.rake
lib/tasks/gitlab/cleanup.rake
+1
-1
qa/qa/specs/features/browser_ui/3_create/merge_request/ee_add_batch_comments_in_merge_request_spec.rb
...ge_request/ee_add_batch_comments_in_merge_request_spec.rb
+1
-1
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+2
-2
spec/migrations/delete_inconsistent_internal_id_records_spec.rb
...igrations/delete_inconsistent_internal_id_records_spec.rb
+1
-1
spec/policies/project_policy_spec.rb
spec/policies/project_policy_spec.rb
+1
-1
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+6
-6
No files found.
app/views/layouts/application.html.haml
View file @
cebfe79a
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
=
render
"layouts/init_client_detection_flags"
=
render
"layouts/init_client_detection_flags"
=
render
'peek/bar'
=
render
'peek/bar'
=
header_message
=
header_message
=
render
partial:
"layouts/header/default"
,
locals:
{
project:
@project
,
group:
@group
}
=
render
partial:
"layouts/header/default"
,
locals:
{
project:
@project
,
group:
@group
}
=
render
'layouts/page'
,
sidebar:
sidebar
,
nav:
nav
=
render
'layouts/page'
,
sidebar:
sidebar
,
nav:
nav
=
footer_message
=
footer_message
...
...
config/initializers/1_settings.rb
View file @
cebfe79a
...
@@ -7,7 +7,7 @@ Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil?
...
@@ -7,7 +7,7 @@ Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil?
Settings
.
ldap
[
'sync_time'
]
=
3600
if
Settings
.
ldap
[
'sync_time'
].
nil?
Settings
.
ldap
[
'sync_time'
]
=
3600
if
Settings
.
ldap
[
'sync_time'
].
nil?
Settings
.
ldap
[
'schedule_sync_daily'
]
=
1
if
Settings
.
ldap
[
'schedule_sync_daily'
].
nil?
Settings
.
ldap
[
'schedule_sync_daily'
]
=
1
if
Settings
.
ldap
[
'schedule_sync_daily'
].
nil?
Settings
.
ldap
[
'schedule_sync_hour'
]
=
1
if
Settings
.
ldap
[
'schedule_sync_hour'
].
nil?
Settings
.
ldap
[
'schedule_sync_hour'
]
=
1
if
Settings
.
ldap
[
'schedule_sync_hour'
].
nil?
Settings
.
ldap
[
'schedule_sync_minute'
]
=
30
if
Settings
.
ldap
[
'schedule_sync_minute'
].
nil?
Settings
.
ldap
[
'schedule_sync_minute'
]
=
30
if
Settings
.
ldap
[
'schedule_sync_minute'
].
nil?
# backwards compatibility, we only have one host
# backwards compatibility, we only have one host
if
Settings
.
ldap
[
'enabled'
]
||
Rails
.
env
.
test?
if
Settings
.
ldap
[
'enabled'
]
||
Rails
.
env
.
test?
...
...
ee/app/helpers/ee/gitlab_routing_helper.rb
View file @
cebfe79a
...
@@ -49,7 +49,7 @@ module EE
...
@@ -49,7 +49,7 @@ module EE
url_helper
:user_group_saml_omniauth_metadata
url_helper
:user_group_saml_omniauth_metadata
def
user_group_saml_omniauth_metadata_path
(
group
)
def
user_group_saml_omniauth_metadata_path
(
group
)
params
=
{
group_path:
group
.
path
,
token:
group
.
saml_discovery_token
}
params
=
{
group_path:
group
.
path
,
token:
group
.
saml_discovery_token
}
path
=
'/users/auth/group_saml/metadata'
path
=
'/users/auth/group_saml/metadata'
ActionDispatch
::
Http
::
URL
.
path_for
(
path:
path
,
params:
params
)
ActionDispatch
::
Http
::
URL
.
path_for
(
path:
path
,
params:
params
)
...
...
ee/app/models/approver.rb
View file @
cebfe79a
# frozen_string_literal: true
# frozen_string_literal: true
class
Approver
<
ActiveRecord
::
Base
class
Approver
<
ActiveRecord
::
Base
belongs_to
:target
,
polymorphic:
true
# rubocop:disable Cop/PolymorphicAssociations
belongs_to
:target
,
polymorphic:
true
# rubocop:disable Cop/PolymorphicAssociations
belongs_to
:user
belongs_to
:user
include
ApproverMigrateHook
include
ApproverMigrateHook
...
...
ee/app/models/approver_group.rb
View file @
cebfe79a
# frozen_string_literal: true
# frozen_string_literal: true
class
ApproverGroup
<
ActiveRecord
::
Base
class
ApproverGroup
<
ActiveRecord
::
Base
belongs_to
:target
,
polymorphic:
true
# rubocop:disable Cop/PolymorphicAssociations
belongs_to
:target
,
polymorphic:
true
# rubocop:disable Cop/PolymorphicAssociations
belongs_to
:group
belongs_to
:group
include
ApproverMigrateHook
include
ApproverMigrateHook
...
...
ee/app/models/draft_note.rb
View file @
cebfe79a
...
@@ -59,7 +59,7 @@ class DraftNote < ActiveRecord::Base
...
@@ -59,7 +59,7 @@ class DraftNote < ActiveRecord::Base
end
end
def
type
def
type
return
'DiffNote'
if
on_diff?
return
'DiffNote'
if
on_diff?
return
'DiscussionNote'
if
discussion_id
.
present?
return
'DiscussionNote'
if
discussion_id
.
present?
'Note'
'Note'
...
...
ee/app/models/ee/appearance.rb
View file @
cebfe79a
...
@@ -9,10 +9,10 @@ module EE
...
@@ -9,10 +9,10 @@ module EE
cache_markdown_field
:footer_message
,
pipeline: :broadcast_message
cache_markdown_field
:footer_message
,
pipeline: :broadcast_message
validates
:message_background_color
,
allow_blank:
true
,
color:
true
validates
:message_background_color
,
allow_blank:
true
,
color:
true
validates
:message_font_color
,
allow_blank:
true
,
color:
true
validates
:message_font_color
,
allow_blank:
true
,
color:
true
default_value_for
:message_background_color
,
'#E75E40'
default_value_for
:message_background_color
,
'#E75E40'
default_value_for
:message_font_color
,
'#FFFFFF'
default_value_for
:message_font_color
,
'#FFFFFF'
end
end
def
show_header?
def
show_header?
...
...
ee/app/models/ee/epic.rb
View file @
cebfe79a
...
@@ -248,7 +248,7 @@ module EE
...
@@ -248,7 +248,7 @@ module EE
def
to_reference
(
from
=
nil
,
full:
false
)
def
to_reference
(
from
=
nil
,
full:
false
)
reference
=
"
#{
self
.
class
.
reference_prefix
}#{
iid
}
"
reference
=
"
#{
self
.
class
.
reference_prefix
}#{
iid
}
"
return
reference
unless
(
cross_reference?
(
from
)
&&
!
group
.
projects
.
include?
(
from
))
||
full
return
reference
unless
(
cross_reference?
(
from
)
&&
!
group
.
projects
.
include?
(
from
))
||
full
"
#{
group
.
full_path
}#{
reference
}
"
"
#{
group
.
full_path
}#{
reference
}
"
end
end
...
...
ee/app/models/ee/user.rb
View file @
cebfe79a
...
@@ -31,7 +31,7 @@ module EE
...
@@ -31,7 +31,7 @@ module EE
has_many
:epics
,
foreign_key: :author_id
has_many
:epics
,
foreign_key: :author_id
has_many
:assigned_epics
,
foreign_key: :assignee_id
,
class_name:
"Epic"
has_many
:assigned_epics
,
foreign_key: :assignee_id
,
class_name:
"Epic"
has_many
:path_locks
,
dependent: :destroy
# rubocop: disable Cop/ActiveRecordDependent
has_many
:path_locks
,
dependent: :destroy
# rubocop: disable Cop/ActiveRecordDependent
has_many
:vulnerability_feedback
,
foreign_key: :author_id
,
class_name:
'Vulnerabilities::Feedback'
has_many
:vulnerability_feedback
,
foreign_key: :author_id
,
class_name:
'Vulnerabilities::Feedback'
has_many
:approvals
,
dependent: :destroy
# rubocop: disable Cop/ActiveRecordDependent
has_many
:approvals
,
dependent: :destroy
# rubocop: disable Cop/ActiveRecordDependent
has_many
:approvers
,
dependent: :destroy
# rubocop: disable Cop/ActiveRecordDependent
has_many
:approvers
,
dependent: :destroy
# rubocop: disable Cop/ActiveRecordDependent
...
...
ee/app/models/geo/project_registry.rb
View file @
cebfe79a
...
@@ -285,7 +285,7 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
...
@@ -285,7 +285,7 @@ class Geo::ProjectRegistry < Geo::BaseRegistry
# @see REGISTRY_TYPES
# @see REGISTRY_TYPES
def
should_be_redownloaded?
(
type
)
def
should_be_redownloaded?
(
type
)
ensure_valid_type!
(
type
)
ensure_valid_type!
(
type
)
return
true
if
public_send
(
"force_to_redownload_
#{
type
}
"
)
# rubocop:disable GitlabSecurity/PublicSend
return
true
if
public_send
(
"force_to_redownload_
#{
type
}
"
)
# rubocop:disable GitlabSecurity/PublicSend
retry_count
(
type
)
>
RETRIES_BEFORE_REDOWNLOAD
retry_count
(
type
)
>
RETRIES_BEFORE_REDOWNLOAD
end
end
...
...
ee/app/models/geo_node.rb
View file @
cebfe79a
...
@@ -127,7 +127,7 @@ class GeoNode < ActiveRecord::Base
...
@@ -127,7 +127,7 @@ class GeoNode < ActiveRecord::Base
end
end
def
url
=
(
value
)
def
url
=
(
value
)
value
+=
'/'
if
value
.
present?
&&
!
value
.
end_with?
(
'/'
)
value
+=
'/'
if
value
.
present?
&&
!
value
.
end_with?
(
'/'
)
write_attribute
(
:url
,
value
)
write_attribute
(
:url
,
value
)
...
@@ -280,7 +280,7 @@ class GeoNode < ActiveRecord::Base
...
@@ -280,7 +280,7 @@ class GeoNode < ActiveRecord::Base
errors
.
add
(
:url
,
'scheme must be http or https'
)
errors
.
add
(
:url
,
'scheme must be http or https'
)
end
end
rescue
URI
::
InvalidURIError
rescue
URI
::
InvalidURIError
errors
.
add
(
:url
,
'is invalid'
)
errors
.
add
(
:url
,
'is invalid'
)
end
end
def
update_clone_url
def
update_clone_url
...
...
ee/app/services/ee/ci/register_job_service.rb
View file @
cebfe79a
...
@@ -31,7 +31,7 @@ module EE
...
@@ -31,7 +31,7 @@ module EE
# select projects which have allowed number of shared runner minutes or are public
# select projects which have allowed number of shared runner minutes or are public
super
super
.
where
(
"projects.visibility_level=? OR (
#{
builds_check_limit
.
to_sql
}
)=1"
,
# rubocop:disable GitlabSecurity/SqlInjection
.
where
(
"projects.visibility_level=? OR (
#{
builds_check_limit
.
to_sql
}
)=1"
,
# rubocop:disable GitlabSecurity/SqlInjection
::
Gitlab
::
VisibilityLevel
::
PUBLIC
)
::
Gitlab
::
VisibilityLevel
::
PUBLIC
)
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
...
...
ee/app/views/groups/analytics/show.html.haml
View file @
cebfe79a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
-
mr_created_count
=
@events
.
merge_requests
.
created
.
count
-
mr_created_count
=
@events
.
merge_requests
.
created
.
count
-
mr_merged_count
=
@events
.
merge_requests
.
merged
.
count
-
mr_merged_count
=
@events
.
merge_requests
.
merged
.
count
-
if
mr_created_count
>
0
||
mr_merged_count
>
0
-
if
mr_created_count
>
0
||
mr_merged_count
>
0
=
_
(
'<strong>%{created_count}</strong> created, <strong>%{accepted_count}</strong> accepted.'
).
html_safe
%
{
created_count:
mr_created_count
,
accepted_count:
mr_merged_count
}
=
_
(
'<strong>%{created_count}</strong> created, <strong>%{accepted_count}</strong> accepted.'
).
html_safe
%
{
created_count:
mr_created_count
,
accepted_count:
mr_merged_count
}
-
else
-
else
=
_
(
'No merge requests for the selected time period.'
)
=
_
(
'No merge requests for the selected time period.'
)
...
...
ee/app/views/groups/security/dashboard/show.html.haml
View file @
cebfe79a
-
breadcrumb_title
_
(
"Security Dashboard"
)
-
breadcrumb_title
_
(
"Security Dashboard"
)
-
page_title
_
(
"Security Dashboard"
)
-
page_title
_
(
"Security Dashboard"
)
#js-group-security-dashboard
{
data:
{
vulnerabilities_endpoint:
group_security_vulnerabilities_path
(
@group
),
#js-group-security-dashboard
{
data:
{
vulnerabilities_endpoint:
group_security_vulnerabilities_path
(
@group
),
vulnerabilities_summary_endpoint:
summary_group_security_vulnerabilities_path
(
@group
),
vulnerabilities_summary_endpoint:
summary_group_security_vulnerabilities_path
(
@group
),
...
...
ee/app/views/projects/feature_flags/index.html.haml
View file @
cebfe79a
...
@@ -6,4 +6,4 @@
...
@@ -6,4 +6,4 @@
"error-state-svg-path"
=>
image_path
(
'illustrations/feature_flag.svg'
),
"error-state-svg-path"
=>
image_path
(
'illustrations/feature_flag.svg'
),
"feature-flags-help-page-path"
=>
help_page_path
(
"user/project/operations/feature_flags"
),
"feature-flags-help-page-path"
=>
help_page_path
(
"user/project/operations/feature_flags"
),
"can-user-admin-feature-flag"
=>
can?
(
current_user
,
:admin_feature_flag
,
@project
),
"can-user-admin-feature-flag"
=>
can?
(
current_user
,
:admin_feature_flag
,
@project
),
"new-feature-flag-path"
=>
can?
(
current_user
,
:create_feature_flag
,
@project
)
?
new_project_feature_flag_path
(
@project
):
nil
}
}
"new-feature-flag-path"
=>
can?
(
current_user
,
:create_feature_flag
,
@project
)
?
new_project_feature_flag_path
(
@project
):
nil
}
}
ee/app/views/users/_custom_project_templates.html.haml
View file @
cebfe79a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
%a
.btn.btn-default.append-right-10
{
href:
project_path
(
template
),
rel:
'noopener noreferrer'
,
target:
'_blank'
}
%a
.btn.btn-default.append-right-10
{
href:
project_path
(
template
),
rel:
'noopener noreferrer'
,
target:
'_blank'
}
=
_
(
'Preview'
)
=
_
(
'Preview'
)
%label
.btn.btn-success.custom-template-button.choose-template.append-bottom-0
{
for:
template
.
name
}
%label
.btn.btn-success.custom-template-button.choose-template.append-bottom-0
{
for:
template
.
name
}
%input
{
type:
"radio"
,
autocomplete:
"off"
,
name:
"project[template_name]"
,
id:
template
.
name
,
value:
template
.
name
}
%input
{
type:
"radio"
,
autocomplete:
"off"
,
name:
"project[template_name]"
,
id:
template
.
name
,
value:
template
.
name
}
%span
%span
=
_
(
'Use template'
)
=
_
(
'Use template'
)
...
...
ee/app/views/users/_custom_project_templates_from_groups.html.haml
View file @
cebfe79a
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
%a
.btn.btn-default.append-right-10
{
href:
project_path
(
project
),
rel:
'noopener noreferrer'
,
target:
'_blank'
}
%a
.btn.btn-default.append-right-10
{
href:
project_path
(
project
),
rel:
'noopener noreferrer'
,
target:
'_blank'
}
=
_
(
'Preview'
)
=
_
(
'Preview'
)
%label
.btn.btn-success.custom-template-button.choose-template.append-bottom-0
{
for:
project
.
name
}
%label
.btn.btn-success.custom-template-button.choose-template.append-bottom-0
{
for:
project
.
name
}
%input
{
type:
"radio"
,
autocomplete:
"off"
,
name:
"project[template_name]"
,
id:
project
.
name
,
value:
project
.
name
,
data:
{
subgroup_id:
project
.
namespace_id
}
}
%input
{
type:
"radio"
,
autocomplete:
"off"
,
name:
"project[template_name]"
,
id:
project
.
name
,
value:
project
.
name
,
data:
{
subgroup_id:
project
.
namespace_id
}
}
%span
.qa-use-template-button
%span
.qa-use-template-button
=
_
(
'Use template'
)
=
_
(
'Use template'
)
...
...
ee/db/migrate/20180626171125_add_feature_flags_to_projects.rb
View file @
cebfe79a
...
@@ -20,7 +20,7 @@ class AddFeatureFlagsToProjects < ActiveRecord::Migration[4.2]
...
@@ -20,7 +20,7 @@ class AddFeatureFlagsToProjects < ActiveRecord::Migration[4.2]
t
.
index
[
:project_id
,
:name
],
unique:
true
t
.
index
[
:project_id
,
:name
],
unique:
true
end
end
create_table
:operations_feature_flags_clients
,
id: :bigserial
do
|
t
|
create_table
:operations_feature_flags_clients
,
id: :bigserial
do
|
t
|
t
.
integer
:project_id
,
null:
false
t
.
integer
:project_id
,
null:
false
t
.
string
:token
,
null:
false
t
.
string
:token
,
null:
false
...
...
ee/db/migrate/20180917171533_create_vulnerability_occurrences.rb
View file @
cebfe79a
...
@@ -6,7 +6,7 @@ class CreateVulnerabilityOccurrences < ActiveRecord::Migration[4.2]
...
@@ -6,7 +6,7 @@ class CreateVulnerabilityOccurrences < ActiveRecord::Migration[4.2]
DOWNTIME
=
false
DOWNTIME
=
false
def
change
def
change
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
t
.
timestamps_with_timezone
null:
false
t
.
timestamps_with_timezone
null:
false
t
.
integer
:severity
,
null:
false
,
limit:
2
t
.
integer
:severity
,
null:
false
,
limit:
2
...
...
ee/db/migrate/20180930171532_recreate_vulnerability_occurrences_and_vulnerability_occurrence_identifiers.rb
View file @
cebfe79a
...
@@ -9,7 +9,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac
...
@@ -9,7 +9,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrences
drop_table
:vulnerability_occurrences
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
t
.
timestamps_with_timezone
null:
false
t
.
timestamps_with_timezone
null:
false
t
.
integer
:severity
,
null:
false
,
limit:
2
t
.
integer
:severity
,
null:
false
,
limit:
2
...
@@ -62,7 +62,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac
...
@@ -62,7 +62,7 @@ class RecreateVulnerabilityOccurrencesAndVulnerabilityOccurrenceIdentifiers < Ac
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrences
drop_table
:vulnerability_occurrences
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
t
.
timestamps_with_timezone
null:
false
t
.
timestamps_with_timezone
null:
false
t
.
integer
:severity
,
null:
false
,
limit:
2
t
.
integer
:severity
,
null:
false
,
limit:
2
...
...
ee/db/migrate/20181004131020_change_vuln_occurrence_columns.rb
View file @
cebfe79a
...
@@ -7,7 +7,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2]
...
@@ -7,7 +7,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2]
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrences
drop_table
:vulnerability_occurrences
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
t
.
timestamps_with_timezone
null:
false
t
.
timestamps_with_timezone
null:
false
t
.
integer
:severity
,
null:
false
,
limit:
2
t
.
integer
:severity
,
null:
false
,
limit:
2
...
@@ -59,7 +59,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2]
...
@@ -59,7 +59,7 @@ class ChangeVulnOccurrenceColumns < ActiveRecord::Migration[4.2]
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrence_identifiers
drop_table
:vulnerability_occurrences
drop_table
:vulnerability_occurrences
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
create_table
:vulnerability_occurrences
,
id: :bigserial
do
|
t
|
t
.
timestamps_with_timezone
null:
false
t
.
timestamps_with_timezone
null:
false
t
.
integer
:severity
,
null:
false
,
limit:
2
t
.
integer
:severity
,
null:
false
,
limit:
2
...
...
ee/lib/api/managed_licenses.rb
View file @
cebfe79a
...
@@ -27,7 +27,7 @@ module API
...
@@ -27,7 +27,7 @@ module API
requires
:id
,
type:
String
,
desc:
'The ID of a project'
requires
:id
,
type:
String
,
desc:
'The ID of a project'
end
end
resource
:projects
,
requirements:
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
do
resource
:projects
,
requirements:
API
::
NAMESPACE_OR_PROJECT_REQUIREMENTS
do
desc
'Get project software license policies'
do
desc
'Get project software license policies'
do
success
Entities
::
ManagedLicense
success
Entities
::
ManagedLicense
end
end
...
...
ee/lib/ee/api/entities.rb
View file @
cebfe79a
...
@@ -350,7 +350,7 @@ module EE
...
@@ -350,7 +350,7 @@ module EE
number_to_percentage
(
node
.
repositories_synced_in_percentage
,
precision:
2
)
number_to_percentage
(
node
.
repositories_synced_in_percentage
,
precision:
2
)
end
end
expose
:wikis_count
# Deprecated
expose
:wikis_count
# Deprecated
expose
:wikis_failed_count
expose
:wikis_failed_count
expose
:wikis_synced_count
expose
:wikis_synced_count
expose
:wikis_synced_in_percentage
do
|
node
|
expose
:wikis_synced_in_percentage
do
|
node
|
...
...
ee/lib/ee/gitlab/usage_data.rb
View file @
cebfe79a
...
@@ -84,7 +84,7 @@ module EE
...
@@ -84,7 +84,7 @@ module EE
}
}
results
=
count
(
::
Ci
::
Build
.
where
(
name:
types
.
keys
).
group
(
:name
),
fallback:
Hash
.
new
(
-
1
))
results
=
count
(
::
Ci
::
Build
.
where
(
name:
types
.
keys
).
group
(
:name
),
fallback:
Hash
.
new
(
-
1
))
results
.
each_with_object
({})
{
|
(
key
,
value
),
response
|
response
[
types
[
key
.
to_sym
]]
=
value
}
results
.
each_with_object
({})
{
|
(
key
,
value
),
response
|
response
[
types
[
key
.
to_sym
]]
=
value
}
end
end
# rubocop: enable CodeReuse/ActiveRecord
# rubocop: enable CodeReuse/ActiveRecord
...
...
ee/lib/tasks/gitlab/elastic.rake
View file @
cebfe79a
...
@@ -31,7 +31,7 @@ namespace :gitlab do
...
@@ -31,7 +31,7 @@ namespace :gitlab do
end
end
desc
"GitLab | Elasticsearch | Index project repositories"
desc
"GitLab | Elasticsearch | Index project repositories"
task
index_repositories: :environment
do
task
index_repositories: :environment
do
print
"Indexing project repositories..."
print
"Indexing project repositories..."
Sidekiq
::
Logging
.
logger
=
Logger
.
new
(
STDOUT
)
Sidekiq
::
Logging
.
logger
=
Logger
.
new
(
STDOUT
)
...
@@ -41,7 +41,7 @@ namespace :gitlab do
...
@@ -41,7 +41,7 @@ namespace :gitlab do
end
end
desc
"GitLab | Elasticsearch | Index wiki repositories"
desc
"GitLab | Elasticsearch | Index wiki repositories"
task
index_wikis: :environment
do
task
index_wikis: :environment
do
projects
=
apply_project_filters
(
Project
.
with_wiki_enabled
)
projects
=
apply_project_filters
(
Project
.
with_wiki_enabled
)
projects
.
find_each
do
|
project
|
projects
.
find_each
do
|
project
|
...
...
ee/spec/controllers/groups/epics_controller_spec.rb
View file @
cebfe79a
...
@@ -278,7 +278,7 @@ describe Groups::EpicsController do
...
@@ -278,7 +278,7 @@ describe Groups::EpicsController do
group
.
add_developer
(
user
)
group
.
add_developer
(
user
)
end
end
context
'with correct basic params'
do
context
'with correct basic params'
do
it
'returns status 200'
do
it
'returns status 200'
do
update_epic
(
epic
,
params
)
update_epic
(
epic
,
params
)
...
...
ee/spec/controllers/groups/security/vulnerabilities_controller_spec.rb
View file @
cebfe79a
...
@@ -246,7 +246,7 @@ describe Groups::Security::VulnerabilitiesController do
...
@@ -246,7 +246,7 @@ describe Groups::Security::VulnerabilitiesController do
end
end
describe
'GET history.json'
do
describe
'GET history.json'
do
subject
{
get
:history
,
params:
{
group_id:
group
},
format: :json
}
subject
{
get
:history
,
params:
{
group_id:
group
},
format: :json
}
context
'when security dashboard feature is disabled'
do
context
'when security dashboard feature is disabled'
do
before
do
before
do
...
@@ -350,7 +350,7 @@ describe Groups::Security::VulnerabilitiesController do
...
@@ -350,7 +350,7 @@ describe Groups::Security::VulnerabilitiesController do
it
'returns filtered history if filters are enabled'
do
it
'returns filtered history if filters are enabled'
do
travel_to
(
Time
.
zone
.
parse
(
'2019-02-10'
))
do
travel_to
(
Time
.
zone
.
parse
(
'2019-02-10'
))
do
get
:history
,
params:
{
group_id:
group
,
report_type:
%w[dependency_scanning sast]
},
format: :json
get
:history
,
params:
{
group_id:
group
,
report_type:
%w[dependency_scanning sast]
},
format: :json
end
end
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
...
...
ee/spec/controllers/projects/issues_controller_spec.rb
View file @
cebfe79a
...
@@ -251,7 +251,7 @@ describe Projects::IssuesController do
...
@@ -251,7 +251,7 @@ describe Projects::IssuesController do
end
end
describe
'GET #discussions'
do
describe
'GET #discussions'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:discussion
)
{
create
(
:discussion_note_on_issue
,
noteable:
issue
,
project:
issue
.
project
)
}
let!
(
:discussion
)
{
create
(
:discussion_note_on_issue
,
noteable:
issue
,
project:
issue
.
project
)
}
context
'with a related system note'
do
context
'with a related system note'
do
...
...
ee/spec/controllers/unsubscribes_controller_spec.rb
View file @
cebfe79a
...
@@ -5,7 +5,7 @@ describe UnsubscribesController do
...
@@ -5,7 +5,7 @@ describe UnsubscribesController do
describe
"show"
do
describe
"show"
do
it
"responds with success"
do
it
"responds with success"
do
get
:show
,
params:
{
email:
Base64
.
urlsafe_encode64
(
'me@example.com'
)
}
get
:show
,
params:
{
email:
Base64
.
urlsafe_encode64
(
'me@example.com'
)
}
assert_response
:success
assert_response
:success
end
end
...
...
ee/spec/factories/geo/project_registry.rb
View file @
cebfe79a
...
@@ -46,7 +46,7 @@ FactoryBot.define do
...
@@ -46,7 +46,7 @@ FactoryBot.define do
trait
:repository_sync_failed
do
trait
:repository_sync_failed
do
sync_failed
sync_failed
last_wiki_successful_sync_at
{
5
.
days
.
ago
}
last_wiki_successful_sync_at
{
5
.
days
.
ago
}
resync_wiki
false
resync_wiki
false
wiki_retry_count
nil
wiki_retry_count
nil
end
end
...
...
ee/spec/factories/vulnerabilities/occurrences.rb
View file @
cebfe79a
...
@@ -8,7 +8,7 @@ FactoryBot.define do
...
@@ -8,7 +8,7 @@ FactoryBot.define do
factory
:vulnerabilities_occurrence
,
class:
Vulnerabilities
::
Occurrence
do
factory
:vulnerabilities_occurrence
,
class:
Vulnerabilities
::
Occurrence
do
name
'Cipher with no integrity'
name
'Cipher with no integrity'
project
project
sequence
(
:uuid
)
{
generate
(
:vulnerability_occurrence_uuid
)
}
sequence
(
:uuid
)
{
generate
(
:vulnerability_occurrence_uuid
)
}
project_fingerprint
{
generate
(
:project_fingerprint
)
}
project_fingerprint
{
generate
(
:project_fingerprint
)
}
primary_identifier
factory: :vulnerabilities_identifier
primary_identifier
factory: :vulnerabilities_identifier
location_fingerprint
'4e5b6966dd100170b4b1ad599c7058cce91b57b4'
location_fingerprint
'4e5b6966dd100170b4b1ad599c7058cce91b57b4'
...
...
ee/spec/features/epics/todo_spec.rb
View file @
cebfe79a
...
@@ -2,8 +2,8 @@ require 'rails_helper'
...
@@ -2,8 +2,8 @@ require 'rails_helper'
describe
'Manually create a todo item from epic'
,
:js
do
describe
'Manually create a todo item from epic'
,
:js
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:user
)
{
create
(
:user
)}
let
(
:user
)
{
create
(
:user
)}
before
do
before
do
stub_licensed_features
(
epics:
true
)
stub_licensed_features
(
epics:
true
)
...
...
ee/spec/features/groups/group_settings_spec.rb
View file @
cebfe79a
...
@@ -3,8 +3,8 @@ require 'spec_helper'
...
@@ -3,8 +3,8 @@ require 'spec_helper'
describe
'Edit group settings'
do
describe
'Edit group settings'
do
include
Select2Helper
include
Select2Helper
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:developer
)
{
create
(
:user
)
}
let
(
:developer
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
path:
'foo'
)
}
let
(
:group
)
{
create
(
:group
,
path:
'foo'
)
}
before
do
before
do
...
...
ee/spec/features/issues/csv_spec.rb
View file @
cebfe79a
...
@@ -6,7 +6,7 @@ describe 'Issues csv' do
...
@@ -6,7 +6,7 @@ describe 'Issues csv' do
let
(
:milestone
)
{
create
(
:milestone
,
title:
'v1.0'
,
project:
project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
title:
'v1.0'
,
project:
project
)
}
let
(
:idea_label
)
{
create
(
:label
,
project:
project
,
title:
'Idea'
)
}
let
(
:idea_label
)
{
create
(
:label
,
project:
project
,
title:
'Idea'
)
}
let
(
:feature_label
)
{
create
(
:label
,
project:
project
,
title:
'Feature'
,
priority:
10
)
}
let
(
:feature_label
)
{
create
(
:label
,
project:
project
,
title:
'Feature'
,
priority:
10
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
before
do
before
do
sign_in
(
user
)
sign_in
(
user
)
...
...
ee/spec/features/projects/pipelines/pipeline_spec.rb
View file @
cebfe79a
...
@@ -47,7 +47,7 @@ describe 'Pipeline', :js do
...
@@ -47,7 +47,7 @@ describe 'Pipeline', :js do
end
end
describe
'GET /:project/pipelines/:id/licenses'
do
describe
'GET /:project/pipelines/:id/licenses'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
,
ref:
'master'
,
sha:
project
.
commit
.
id
)
}
before
do
before
do
stub_licensed_features
(
license_management:
true
)
stub_licensed_features
(
license_management:
true
)
...
...
ee/spec/features/promotion_spec.rb
View file @
cebfe79a
...
@@ -7,7 +7,7 @@ describe 'Promotions', :js do
...
@@ -7,7 +7,7 @@ describe 'Promotions', :js do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
group
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
start_date:
Date
.
today
,
due_date:
7
.
days
.
from_now
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
,
start_date:
Date
.
today
,
due_date:
7
.
days
.
from_now
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let
(
:otherproject
)
{
create
(
:project
,
:repository
,
namespace:
otherdeveloper
.
namespace
)
}
let
(
:otherproject
)
{
create
(
:project
,
:repository
,
namespace:
otherdeveloper
.
namespace
)
}
describe
'if you have a license'
do
describe
'if you have a license'
do
...
...
ee/spec/finders/epics_finder_spec.rb
View file @
cebfe79a
require
'spec_helper'
require
'spec_helper'
describe
EpicsFinder
do
describe
EpicsFinder
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:search_user
)
{
create
(
:user
)
}
let
(
:search_user
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
,
:private
)
}
let
(
:group
)
{
create
(
:group
,
:private
)
}
let
(
:another_group
)
{
create
(
:group
)
}
let
(
:another_group
)
{
create
(
:group
)
}
let!
(
:epic1
)
{
create
(
:epic
,
:opened
,
group:
group
,
title:
'This is awesome epic'
,
created_at:
1
.
week
.
ago
)
}
let!
(
:epic1
)
{
create
(
:epic
,
:opened
,
group:
group
,
title:
'This is awesome epic'
,
created_at:
1
.
week
.
ago
)
}
...
...
ee/spec/lib/gitlab/auth/smartcard/certificate_spec.rb
View file @
cebfe79a
...
@@ -109,7 +109,7 @@ describe Gitlab::Auth::Smartcard::Certificate do
...
@@ -109,7 +109,7 @@ describe Gitlab::Auth::Smartcard::Certificate do
context
'avoids conflicting namespaces'
do
context
'avoids conflicting namespaces'
do
let
(
:subject_dn
)
{
'/CN=Gitlab User/emailAddress=gitlab-user@random-corp.org'
}
let
(
:subject_dn
)
{
'/CN=Gitlab User/emailAddress=gitlab-user@random-corp.org'
}
let!
(
:existing_user
)
{
create
(
:user
,
username:
'GitlabUser'
)
}
let!
(
:existing_user
)
{
create
(
:user
,
username:
'GitlabUser'
)
}
it
'creates user with correct usnername'
do
it
'creates user with correct usnername'
do
expect
{
subject
}.
to
change
{
User
.
count
}.
from
(
1
).
to
(
2
)
expect
{
subject
}.
to
change
{
User
.
count
}.
from
(
1
).
to
(
2
)
...
...
ee/spec/lib/gitlab/auth_spec.rb
View file @
cebfe79a
...
@@ -8,7 +8,7 @@ describe Gitlab::Auth do
...
@@ -8,7 +8,7 @@ describe Gitlab::Auth do
password:
password
,
password:
password
,
password_confirmation:
password
)
password_confirmation:
password
)
end
end
let
(
:username
)
{
'John'
}
# username isn't lowercase, test this
let
(
:username
)
{
'John'
}
# username isn't lowercase, test this
let
(
:password
)
{
'my-secret'
}
let
(
:password
)
{
'my-secret'
}
context
'with kerberos'
do
context
'with kerberos'
do
...
...
ee/spec/lib/gitlab/elastic/indexer_spec.rb
View file @
cebfe79a
...
@@ -11,7 +11,7 @@ describe Gitlab::Elastic::Indexer do
...
@@ -11,7 +11,7 @@ describe Gitlab::Elastic::Indexer do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:from_sha
)
{
Gitlab
::
Git
::
BLANK_SHA
}
let
(
:from_sha
)
{
Gitlab
::
Git
::
BLANK_SHA
}
let
(
:to_sha
)
{
project
.
commit
.
try
(
:sha
)
}
let
(
:to_sha
)
{
project
.
commit
.
try
(
:sha
)
}
let
(
:indexer
)
{
described_class
.
new
(
project
)
}
let
(
:indexer
)
{
described_class
.
new
(
project
)
}
let
(
:popen_success
)
{
[[
''
],
0
]
}
let
(
:popen_success
)
{
[[
''
],
0
]
}
let
(
:popen_failure
)
{
[[
'error'
],
1
]
}
let
(
:popen_failure
)
{
[[
'error'
],
1
]
}
...
...
ee/spec/lib/gitlab/git_access_wiki_spec.rb
View file @
cebfe79a
...
@@ -26,7 +26,7 @@ describe Gitlab::GitAccessWiki do
...
@@ -26,7 +26,7 @@ describe Gitlab::GitAccessWiki do
context
'when wiki is disabled'
do
context
'when wiki is disabled'
do
let
(
:user
)
{
:geo
}
let
(
:user
)
{
:geo
}
let
(
:project
)
{
create
(
:project
,
:private
,
:wiki_repo
,
wiki_access_level:
ProjectFeature
::
DISABLED
)
}
let
(
:project
)
{
create
(
:project
,
:private
,
:wiki_repo
,
wiki_access_level:
ProjectFeature
::
DISABLED
)
}
let
(
:authentication_abilities
)
{
[
:download_code
]
}
let
(
:authentication_abilities
)
{
[
:download_code
]
}
subject
{
access
.
check
(
'git-upload-pack'
,
changes
)
}
subject
{
access
.
check
(
'git-upload-pack'
,
changes
)
}
...
...
ee/spec/lib/system_check/geo/http_clone_enabled_check_spec.rb
View file @
cebfe79a
...
@@ -9,8 +9,8 @@ describe SystemCheck::Geo::HTTPCloneEnabledCheck do
...
@@ -9,8 +9,8 @@ describe SystemCheck::Geo::HTTPCloneEnabledCheck do
[
'unknown'
,
false
],
[
'unknown'
,
false
],
[
'ssh'
,
false
],
[
'ssh'
,
false
],
[
'http'
,
true
],
[
'http'
,
true
],
[
''
,
true
],
[
''
,
true
],
[
nil
,
true
]
[
nil
,
true
]
]
]
end
end
...
...
ee/spec/migrations/delete_inconsistent_internal_id_records_spec.rb
View file @
cebfe79a
...
@@ -6,7 +6,7 @@ require Rails.root.join('db', 'post_migrate', '20180723130817_delete_inconsisten
...
@@ -6,7 +6,7 @@ require Rails.root.join('db', 'post_migrate', '20180723130817_delete_inconsisten
describe
DeleteInconsistentInternalIdRecords
,
:migration
do
describe
DeleteInconsistentInternalIdRecords
,
:migration
do
context
'for milestones (by group)'
do
context
'for milestones (by group)'
do
# milestones (by group) is a little different than most of the other models
# milestones (by group) is a little different than most of the other models
let
(
:groups
)
{
table
(
:namespaces
)
}
let
(
:groups
)
{
table
(
:namespaces
)
}
let
(
:group1
)
{
groups
.
create
(
name:
'Group 1'
,
type:
'Group'
,
path:
'group_1'
)
}
let
(
:group1
)
{
groups
.
create
(
name:
'Group 1'
,
type:
'Group'
,
path:
'group_1'
)
}
let
(
:group2
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_2'
)
}
let
(
:group2
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_2'
)
}
let
(
:group3
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_3'
)
}
let
(
:group3
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_3'
)
}
...
...
ee/spec/migrations/migrate_mirror_attributes_data_from_projects_to_import_state_spec.rb
View file @
cebfe79a
...
@@ -4,7 +4,7 @@ require Rails.root.join('ee', 'db', 'post_migrate', '20180502130136_migrate_mirr
...
@@ -4,7 +4,7 @@ require Rails.root.join('ee', 'db', 'post_migrate', '20180502130136_migrate_mirr
describe
MigrateMirrorAttributesDataFromProjectsToImportState
,
:migration
do
describe
MigrateMirrorAttributesDataFromProjectsToImportState
,
:migration
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:import_state
)
{
table
(
:project_mirror_data
)
}
let
(
:import_state
)
{
table
(
:project_mirror_data
)
}
describe
'#up'
do
describe
'#up'
do
before
do
before
do
...
...
ee/spec/models/application_setting_spec.rb
View file @
cebfe79a
...
@@ -51,7 +51,7 @@ describe ApplicationSetting do
...
@@ -51,7 +51,7 @@ describe ApplicationSetting do
it
{
is_expected
.
to
allow_value
(
''
).
for
(
:external_auth_client_key
)
}
it
{
is_expected
.
to
allow_value
(
''
).
for
(
:external_auth_client_key
)
}
context
'when setting a valid client certificate for external authorization'
do
context
'when setting a valid client certificate for external authorization'
do
let
(
:certificate_data
)
{
File
.
read
(
'ee/spec/fixtures/passphrase_x509_certificate.crt'
)
}
let
(
:certificate_data
)
{
File
.
read
(
'ee/spec/fixtures/passphrase_x509_certificate.crt'
)
}
before
do
before
do
setting
.
external_auth_client_cert
=
certificate_data
setting
.
external_auth_client_cert
=
certificate_data
...
...
ee/spec/models/ci/bridge_spec.rb
View file @
cebfe79a
...
@@ -40,7 +40,7 @@ describe Ci::Bridge do
...
@@ -40,7 +40,7 @@ describe Ci::Bridge do
end
end
context
'when trigger does not have project defined'
do
context
'when trigger does not have project defined'
do
let
(
:options
)
{
{
trigger:
{}
}
}
let
(
:options
)
{
{
trigger:
{}
}
}
it
'returns nil'
do
it
'returns nil'
do
expect
(
bridge
.
target_project_path
).
to
be_nil
expect
(
bridge
.
target_project_path
).
to
be_nil
...
...
ee/spec/models/ee/environment_spec.rb
View file @
cebfe79a
...
@@ -43,7 +43,7 @@ describe Environment do
...
@@ -43,7 +43,7 @@ describe Environment do
context
'when the environment is protected'
do
context
'when the environment is protected'
do
before
do
before
do
create
(
:protected_environment
,
name:
environment
.
name
,
project:
project
)
create
(
:protected_environment
,
name:
environment
.
name
,
project:
project
)
end
end
it
{
is_expected
.
to
be_truthy
}
it
{
is_expected
.
to
be_truthy
}
...
...
ee/spec/models/epic_spec.rb
View file @
cebfe79a
...
@@ -584,7 +584,7 @@ describe Epic do
...
@@ -584,7 +584,7 @@ describe Epic do
end
end
context
'mentioning other objects'
do
context
'mentioning other objects'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
let
(
:project
)
{
create
(
:project
,
:repository
,
:public
)
}
...
...
ee/spec/models/geo/every_geo_event_spec.rb
View file @
cebfe79a
...
@@ -4,7 +4,7 @@ describe 'Every Geo event' do
...
@@ -4,7 +4,7 @@ describe 'Every Geo event' do
subject
{
events
}
subject
{
events
}
it
'includes Geo::Eventable'
do
it
'includes Geo::Eventable'
do
is_expected
.
to
all
(
satisfy
{
|
klass
|
klass
.
ancestors
.
include?
(
Geo
::
Eventable
)
})
is_expected
.
to
all
(
satisfy
{
|
klass
|
klass
.
ancestors
.
include?
(
Geo
::
Eventable
)
})
end
end
it
'has its class in Geo::EventLog::EVENT_CLASSES'
do
it
'has its class in Geo::EventLog::EVENT_CLASSES'
do
...
...
ee/spec/models/geo_node_status_spec.rb
View file @
cebfe79a
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
GeoNodeStatus
,
:geo
do
describe
GeoNodeStatus
,
:geo
do
include
::
EE
::
GeoHelpers
include
::
EE
::
GeoHelpers
let!
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let!
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
let!
(
:secondary
)
{
create
(
:geo_node
)
}
let!
(
:secondary
)
{
create
(
:geo_node
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
...
@@ -857,7 +857,7 @@ describe GeoNodeStatus, :geo do
...
@@ -857,7 +857,7 @@ describe GeoNodeStatus, :geo do
end
end
describe
'#revision'
do
describe
'#revision'
do
it
{
expect
(
status
.
revision
).
to
eq
(
Gitlab
.
revision
)
}
it
{
expect
(
status
.
revision
).
to
eq
(
Gitlab
.
revision
)
}
end
end
describe
'#[]'
do
describe
'#[]'
do
...
...
ee/spec/models/project_spec.rb
View file @
cebfe79a
...
@@ -1425,7 +1425,7 @@ describe Project do
...
@@ -1425,7 +1425,7 @@ describe Project do
let
(
:secondary_base_host
)
{
'secondary.geo'
}
let
(
:secondary_base_host
)
{
'secondary.geo'
}
let
(
:secondary_base_url
)
{
"http://
#{
secondary_base_host
}
"
}
let
(
:secondary_base_url
)
{
"http://
#{
secondary_base_host
}
"
}
let
(
:secondary_node
)
{
create
(
:geo_node
,
url:
secondary_base_url
)
}
let
(
:secondary_node
)
{
create
(
:geo_node
,
url:
secondary_base_url
)
}
let
(
:secondary_url
)
{
"
#{
secondary_base_url
}#{
project_path
}
"
}
let
(
:secondary_url
)
{
"
#{
secondary_base_url
}#{
project_path
}
"
}
before
do
before
do
stub_current_geo_node
(
secondary_node
)
stub_current_geo_node
(
secondary_node
)
...
...
ee/spec/requests/api/epic_issues_spec.rb
View file @
cebfe79a
...
@@ -190,7 +190,7 @@ describe API::EpicIssues do
...
@@ -190,7 +190,7 @@ describe API::EpicIssues do
context
'when epic_issue association does not include the epic in the url'
do
context
'when epic_issue association does not include the epic in the url'
do
before
do
before
do
other_group
=
create
(
:group
)
other_group
=
create
(
:group
)
other_group_epic
=
create
(
:epic
,
group:
other_group
)
other_group_epic
=
create
(
:epic
,
group:
other_group
)
epic_issue
.
update_attribute
(
:epic
,
other_group_epic
)
epic_issue
.
update_attribute
(
:epic
,
other_group_epic
)
group
.
add_developer
(
user
)
group
.
add_developer
(
user
)
...
...
ee/spec/requests/api/geo_nodes_spec.rb
View file @
cebfe79a
...
@@ -112,7 +112,7 @@ describe API::GeoNodes, :geo, :prometheus, api: true do
...
@@ -112,7 +112,7 @@ describe API::GeoNodes, :geo, :prometheus, api: true do
expect
(
response
).
to
match_response_schema
(
'public_api/v4/geo_node_status'
,
dir:
'ee'
)
expect
(
response
).
to
match_response_schema
(
'public_api/v4/geo_node_status'
,
dir:
'ee'
)
end
end
it
'shows the database-held response if current node status exists in the database, but not redis'
do
it
'shows the database-held response if current node status exists in the database, but not redis'
do
stub_current_geo_node
(
secondary
)
stub_current_geo_node
(
secondary
)
expect
(
GeoNodeStatus
).
to
receive
(
:fast_current_node_status
).
and_return
(
nil
)
expect
(
GeoNodeStatus
).
to
receive
(
:fast_current_node_status
).
and_return
(
nil
)
...
...
ee/spec/requests/api/ldap_group_links_spec.rb
View file @
cebfe79a
require
'spec_helper'
require
'spec_helper'
describe
API
::
LdapGroupLinks
,
api:
true
do
describe
API
::
LdapGroupLinks
,
api:
true
do
include
ApiHelpers
include
ApiHelpers
let
(
:owner
)
{
create
(
:user
)
}
let
(
:owner
)
{
create
(
:user
)
}
...
...
ee/spec/requests/api/license_spec.rb
View file @
cebfe79a
require
'spec_helper'
require
'spec_helper'
describe
API
::
License
,
api:
true
do
describe
API
::
License
,
api:
true
do
include
ApiHelpers
include
ApiHelpers
let
(
:gl_license
)
{
build
(
:gitlab_license
)
}
let
(
:gl_license
)
{
build
(
:gitlab_license
)
}
...
...
ee/spec/requests/api/merge_requests_spec.rb
View file @
cebfe79a
...
@@ -7,7 +7,7 @@ describe API::MergeRequests do
...
@@ -7,7 +7,7 @@ describe API::MergeRequests do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
:repository
,
creator:
user
,
namespace:
user
.
namespace
,
only_allow_merge_if_pipeline_succeeds:
false
)
}
let!
(
:project
)
{
create
(
:project
,
:public
,
:repository
,
creator:
user
,
namespace:
user
.
namespace
,
only_allow_merge_if_pipeline_succeeds:
false
)
}
let
(
:milestone
)
{
create
(
:milestone
,
title:
'1.0.0'
,
project:
project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
title:
'1.0.0'
,
project:
project
)
}
let
(
:milestone1
)
{
create
(
:milestone
,
title:
'0.9'
,
project:
project
)
}
let
(
:milestone1
)
{
create
(
:milestone
,
title:
'0.9'
,
project:
project
)
}
let!
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
milestone:
milestone1
,
author:
user
,
assignee:
user
,
source_project:
project
,
target_project:
project
,
title:
"Test"
,
created_at:
base_time
)
}
let!
(
:merge_request
)
{
create
(
:merge_request
,
:simple
,
milestone:
milestone1
,
author:
user
,
assignee:
user
,
source_project:
project
,
target_project:
project
,
title:
"Test"
,
created_at:
base_time
)
}
let!
(
:label
)
do
let!
(
:label
)
do
create
(
:label
,
title:
'label'
,
color:
'#FFAABB'
,
project:
project
)
create
(
:label
,
title:
'label'
,
color:
'#FFAABB'
,
project:
project
)
...
...
ee/spec/requests/api/project_push_rule_spec.rb
View file @
cebfe79a
require
'spec_helper'
require
'spec_helper'
describe
API
::
ProjectPushRule
,
'ProjectPushRule'
,
api:
true
do
describe
API
::
ProjectPushRule
,
'ProjectPushRule'
,
api:
true
do
include
ApiHelpers
include
ApiHelpers
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user3
)
{
create
(
:user
)
}
let
(
:user3
)
{
create
(
:user
)
}
...
...
ee/spec/requests/smartcard_controller_spec.rb
View file @
cebfe79a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
'spec_helper'
describe
SmartcardController
,
type: :request
do
describe
SmartcardController
,
type: :request
do
let
(
:subject_dn
)
{
'/O=Random Corp Ltd/CN=gitlab-user/emailAddress=gitlab-user@random-corp.org'
}
let
(
:subject_dn
)
{
'/O=Random Corp Ltd/CN=gitlab-user/emailAddress=gitlab-user@random-corp.org'
}
let
(
:issuer_dn
)
{
'/O=Random Corp Ltd/CN=Random Corp'
}
let
(
:issuer_dn
)
{
'/O=Random Corp Ltd/CN=Random Corp'
}
let
(
:certificate_headers
)
{
{
'X-SSL-CLIENT-CERTIFICATE'
:
'certificate'
}
}
let
(
:certificate_headers
)
{
{
'X-SSL-CLIENT-CERTIFICATE'
:
'certificate'
}
}
...
...
ee/spec/serializers/epic_entity_spec.rb
View file @
cebfe79a
require
'spec_helper'
require
'spec_helper'
describe
EpicEntity
do
describe
EpicEntity
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:resource
)
{
create
(
:epic
,
group:
group
)
}
let
(
:resource
)
{
create
(
:epic
,
group:
group
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
...
@@ -10,7 +10,7 @@ describe EpicEntity do
...
@@ -10,7 +10,7 @@ describe EpicEntity do
subject
{
described_class
.
new
(
resource
,
request:
request
).
as_json
}
subject
{
described_class
.
new
(
resource
,
request:
request
).
as_json
}
it
'has Issuable attributes'
do
it
'has Issuable attributes'
do
expect
(
subject
).
to
include
(
:id
,
:iid
,
:description
,
:title
,
:labels
)
expect
(
subject
).
to
include
(
:id
,
:iid
,
:description
,
:title
,
:labels
)
end
end
it
'has epic specific attributes'
do
it
'has epic specific attributes'
do
...
...
ee/spec/services/ee/boards/issues/list_service_spec.rb
View file @
cebfe79a
...
@@ -6,14 +6,14 @@ describe Boards::Issues::ListService, services: true do
...
@@ -6,14 +6,14 @@ describe Boards::Issues::ListService, services: true do
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
:empty_repo
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
:empty_repo
,
namespace:
group
)
}
let
(
:project1
)
{
create
(
:project
,
:empty_repo
,
namespace:
group
)
}
let
(
:project1
)
{
create
(
:project
,
:empty_repo
,
namespace:
group
)
}
let
(
:board
)
{
create
(
:board
,
group:
group
)
}
let
(
:board
)
{
create
(
:board
,
group:
group
)
}
let
(
:m1
)
{
create
(
:milestone
,
group:
group
)
}
let
(
:m1
)
{
create
(
:milestone
,
group:
group
)
}
let
(
:m2
)
{
create
(
:milestone
,
group:
group
)
}
let
(
:m2
)
{
create
(
:milestone
,
group:
group
)
}
let
(
:bug
)
{
create
(
:group_label
,
group:
group
,
name:
'Bug'
)
}
let
(
:bug
)
{
create
(
:group_label
,
group:
group
,
name:
'Bug'
)
}
let
(
:development
)
{
create
(
:group_label
,
group:
group
,
name:
'Development'
)
}
let
(
:development
)
{
create
(
:group_label
,
group:
group
,
name:
'Development'
)
}
let
(
:testing
)
{
create
(
:group_label
,
group:
group
,
name:
'Testing'
)
}
let
(
:testing
)
{
create
(
:group_label
,
group:
group
,
name:
'Testing'
)
}
let
(
:p1
)
{
create
(
:group_label
,
title:
'P1'
,
group:
group
)
}
let
(
:p1
)
{
create
(
:group_label
,
title:
'P1'
,
group:
group
)
}
let
(
:p2
)
{
create
(
:group_label
,
title:
'P2'
,
group:
group
)
}
let
(
:p2
)
{
create
(
:group_label
,
title:
'P2'
,
group:
group
)
}
...
...
ee/spec/services/ee/boards/issues/move_service_spec.rb
View file @
cebfe79a
...
@@ -27,7 +27,7 @@ describe Boards::Issues::MoveService, services: true do
...
@@ -27,7 +27,7 @@ describe Boards::Issues::MoveService, services: true do
end
end
context
'from label to milestone list'
do
context
'from label to milestone list'
do
let
(
:issue
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
bug
,
development
])
}
let
(
:issue
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
bug
,
development
])
}
it
'assigns the milestone and keeps labels'
do
it
'assigns the milestone and keeps labels'
do
params
=
{
board_id:
board1
.
id
,
from_list_id:
label_list1
.
id
,
to_list_id:
milestone_list1
.
id
}
params
=
{
board_id:
board1
.
id
,
from_list_id:
label_list1
.
id
,
to_list_id:
milestone_list1
.
id
}
...
@@ -203,7 +203,7 @@ describe Boards::Issues::MoveService, services: true do
...
@@ -203,7 +203,7 @@ describe Boards::Issues::MoveService, services: true do
let
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let
(
:development
)
{
create
(
:label
,
project:
project
,
name:
'Development'
)
}
let
(
:development
)
{
create
(
:label
,
project:
project
,
name:
'Development'
)
}
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:testing
)
{
create
(
:label
,
project:
project
,
name:
'Testing'
)
}
let
(
:regression
)
{
create
(
:label
,
project:
project
,
name:
'Regression'
)
}
let
(
:regression
)
{
create
(
:label
,
project:
project
,
name:
'Regression'
)
}
before
do
before
do
...
@@ -226,7 +226,7 @@ describe Boards::Issues::MoveService, services: true do
...
@@ -226,7 +226,7 @@ describe Boards::Issues::MoveService, services: true do
let
(
:bug
)
{
create
(
:group_label
,
group:
group
,
name:
'Bug'
)
}
let
(
:bug
)
{
create
(
:group_label
,
group:
group
,
name:
'Bug'
)
}
let
(
:development
)
{
create
(
:group_label
,
group:
group
,
name:
'Development'
)
}
let
(
:development
)
{
create
(
:group_label
,
group:
group
,
name:
'Development'
)
}
let
(
:testing
)
{
create
(
:group_label
,
group:
group
,
name:
'Testing'
)
}
let
(
:testing
)
{
create
(
:group_label
,
group:
group
,
name:
'Testing'
)
}
let
(
:regression
)
{
create
(
:group_label
,
group:
group
,
name:
'Regression'
)
}
let
(
:regression
)
{
create
(
:group_label
,
group:
group
,
name:
'Regression'
)
}
before
do
before
do
...
...
ee/spec/services/epics/update_service_spec.rb
View file @
cebfe79a
...
@@ -88,7 +88,7 @@ describe Epics::UpdateService do
...
@@ -88,7 +88,7 @@ describe Epics::UpdateService do
end
end
context
'adding a label'
do
context
'adding a label'
do
let
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
let
(
:label
)
{
create
(
:group_label
,
group:
group
)
}
let
(
:user2
)
{
create
(
:user
)
}
let
(
:user2
)
{
create
(
:user
)
}
let!
(
:todo1
)
do
let!
(
:todo1
)
do
create
(
:todo
,
:mentioned
,
:pending
,
create
(
:todo
,
:mentioned
,
:pending
,
...
...
ee/spec/services/geo/file_download_service_spec.rb
View file @
cebfe79a
...
@@ -4,7 +4,7 @@ describe Geo::FileDownloadService do
...
@@ -4,7 +4,7 @@ describe Geo::FileDownloadService do
include
::
EE
::
GeoHelpers
include
::
EE
::
GeoHelpers
include
ExclusiveLeaseHelpers
include
ExclusiveLeaseHelpers
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:primary
)
{
create
(
:geo_node
,
:primary
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
set
(
:secondary
)
{
create
(
:geo_node
)
}
before
do
before
do
...
...
ee/spec/services/geo/repository_updated_event_store_spec.rb
View file @
cebfe79a
...
@@ -5,7 +5,7 @@ require 'spec_helper'
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
Geo
::
RepositoryUpdatedEventStore
do
describe
Geo
::
RepositoryUpdatedEventStore
do
include
EE
::
GeoHelpers
include
EE
::
GeoHelpers
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
set
(
:secondary_node
)
{
create
(
:geo_node
)
}
let
(
:blankrev
)
{
Gitlab
::
Git
::
BLANK_SHA
}
let
(
:blankrev
)
{
Gitlab
::
Git
::
BLANK_SHA
}
...
...
ee/spec/services/projects/gitlab_projects_import_service_spec.rb
View file @
cebfe79a
...
@@ -14,7 +14,7 @@ describe Projects::GitlabProjectsImportService do
...
@@ -14,7 +14,7 @@ describe Projects::GitlabProjectsImportService do
end
end
describe
'#execute'
do
describe
'#execute'
do
context
'creates export job'
do
context
'creates export job'
do
it
'if project saved and custom template exists'
do
it
'if project saved and custom template exists'
do
expect
(
custom_template
).
to
receive
(
:add_export_job
)
expect
(
custom_template
).
to
receive
(
:add_export_job
)
...
...
ee/spec/services/projects/slack_application_install_service_spec.rb
View file @
cebfe79a
...
@@ -28,7 +28,7 @@ describe Projects::SlackApplicationInstallService do
...
@@ -28,7 +28,7 @@ describe Projects::SlackApplicationInstallService do
result
=
service
.
execute
result
=
service
.
execute
expect
(
result
).
to
eq
(
message:
'Slack: something is wrong'
,
status: :error
)
expect
(
result
).
to
eq
(
message:
'Slack: something is wrong'
,
status: :error
)
end
end
it
'returns success result and creates all the needed records'
do
it
'returns success result and creates all the needed records'
do
...
...
ee/spec/services/todo_service_spec.rb
View file @
cebfe79a
...
@@ -20,7 +20,7 @@ describe TodoService do
...
@@ -20,7 +20,7 @@ describe TodoService do
let
(
:description_directly_addressed
)
{
"
#{
mentions
}
\n
- [ ] Task 1
\n
- [ ] Task 2"
}
let
(
:description_directly_addressed
)
{
"
#{
mentions
}
\n
- [ ] Task 1
\n
- [ ] Task 2"
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:group
)
{
create
(
:group
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
,
author:
author
,
description:
description_mentions
)
}
let
(
:epic
)
{
create
(
:epic
,
group:
group
,
author:
author
,
description:
description_mentions
)
}
let
(
:todos_for
)
{
[]
}
let
(
:todos_for
)
{
[]
}
let
(
:todos_not_for
)
{
[]
}
let
(
:todos_not_for
)
{
[]
}
...
...
ee/spec/services/users/migrate_to_ghost_user_service_spec.rb
View file @
cebfe79a
require
'spec_helper'
require
'spec_helper'
describe
Users
::
MigrateToGhostUserService
do
describe
Users
::
MigrateToGhostUserService
do
context
'epics'
do
context
'epics'
do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:user
)
{
create
(
:user
)
}
let
(
:service
)
{
described_class
.
new
(
user
)
}
let
(
:service
)
{
described_class
.
new
(
user
)
}
...
@@ -20,7 +20,7 @@ describe Users::MigrateToGhostUserService do
...
@@ -20,7 +20,7 @@ describe Users::MigrateToGhostUserService do
end
end
end
end
context
'vulnerability_feedback'
do
context
'vulnerability_feedback'
do
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:user
)
{
create
(
:user
)
}
let
(
:service
)
{
described_class
.
new
(
user
)
}
let
(
:service
)
{
described_class
.
new
(
user
)
}
...
...
lib/tasks/gitlab/cleanup.rake
View file @
cebfe79a
...
@@ -37,7 +37,7 @@ namespace :gitlab do
...
@@ -37,7 +37,7 @@ namespace :gitlab do
end
end
desc
"GitLab | Cleanup | Delete moved repositories"
desc
"GitLab | Cleanup | Delete moved repositories"
task
moved: :gitlab_environment
do
task
moved: :gitlab_environment
do
warn_user_is_not_gitlab
warn_user_is_not_gitlab
remove_flag
=
ENV
[
'REMOVE'
]
remove_flag
=
ENV
[
'REMOVE'
]
...
...
qa/qa/specs/features/browser_ui/3_create/merge_request/ee_add_batch_comments_in_merge_request_spec.rb
View file @
cebfe79a
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
QA
module
QA
context
'Create'
do
context
'Create'
do
describe
'batch comments in merge request'
do
describe
'batch comments in merge request'
do
it
'user submits, discards batch comments'
do
it
'user submits, discards batch comments'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
...
...
spec/features/boards/boards_spec.rb
View file @
cebfe79a
...
@@ -7,8 +7,8 @@ describe 'Issue Boards', :js do
...
@@ -7,8 +7,8 @@ describe 'Issue Boards', :js do
let
(
:group
)
{
create
(
:group
,
:nested
)
}
let
(
:group
)
{
create
(
:group
,
:nested
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:milestone
)
{
create
(
:milestone
,
title:
"v2.2"
,
project:
project
)
}
let
(
:milestone
)
{
create
(
:milestone
,
title:
"v2.2"
,
project:
project
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
let!
(
:board_with_milestone
)
{
create
(
:board
,
project:
project
,
milestone:
milestone
)
}
let!
(
:board_with_milestone
)
{
create
(
:board
,
project:
project
,
milestone:
milestone
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let!
(
:user2
)
{
create
(
:user
)
}
let!
(
:user2
)
{
create
(
:user
)
}
...
...
spec/migrations/delete_inconsistent_internal_id_records_spec.rb
View file @
cebfe79a
...
@@ -106,7 +106,7 @@ describe DeleteInconsistentInternalIdRecords, :migration do
...
@@ -106,7 +106,7 @@ describe DeleteInconsistentInternalIdRecords, :migration do
let
(
:group1
)
{
groups
.
create
(
name:
'Group 1'
,
type:
'Group'
,
path:
'group_1'
)
}
let
(
:group1
)
{
groups
.
create
(
name:
'Group 1'
,
type:
'Group'
,
path:
'group_1'
)
}
let
(
:group2
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_2'
)
}
let
(
:group2
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_2'
)
}
let
(
:group3
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_3'
)
}
let
(
:group3
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_3'
)
}
let!
(
:user
)
{
create
(
:user
)
}
let!
(
:user
)
{
create
(
:user
)
}
let
(
:internal_id_query
)
{
->
(
group
)
{
InternalId
.
where
(
usage:
InternalId
.
usages
[
'epics'
],
namespace:
group
)
}
}
let
(
:internal_id_query
)
{
->
(
group
)
{
InternalId
.
where
(
usage:
InternalId
.
usages
[
'epics'
],
namespace:
group
)
}
}
...
...
spec/policies/project_policy_spec.rb
View file @
cebfe79a
...
@@ -430,7 +430,7 @@ describe ProjectPolicy do
...
@@ -430,7 +430,7 @@ describe ProjectPolicy do
it_behaves_like
'project policies as admin'
it_behaves_like
'project policies as admin'
context
'EE'
do
context
'EE'
do
let
(
:additional_guest_permissions
)
{
[
:read_issue_link
]
}
let
(
:additional_guest_permissions
)
{
[
:read_issue_link
]
}
let
(
:additional_reporter_permissions
)
{
[
:admin_issue_link
]}
let
(
:additional_reporter_permissions
)
{
[
:admin_issue_link
]}
let
(
:additional_maintainer_permissions
)
{
[
:push_code_to_protected_branches
]
}
let
(
:additional_maintainer_permissions
)
{
[
:push_code_to_protected_branches
]
}
let
(
:auditor_permissions
)
do
let
(
:auditor_permissions
)
do
...
...
spec/services/system_note_service_spec.rb
View file @
cebfe79a
...
@@ -928,7 +928,7 @@ describe SystemNoteService do
...
@@ -928,7 +928,7 @@ describe SystemNoteService do
end
end
describe
'.approve_mr'
do
describe
'.approve_mr'
do
let
(
:noteable
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:noteable
)
{
create
(
:merge_request
,
source_project:
project
)
}
subject
{
described_class
.
approve_mr
(
noteable
,
author
)
}
subject
{
described_class
.
approve_mr
(
noteable
,
author
)
}
it_behaves_like
'a system note'
do
it_behaves_like
'a system note'
do
...
@@ -943,7 +943,7 @@ describe SystemNoteService do
...
@@ -943,7 +943,7 @@ describe SystemNoteService do
end
end
describe
'.unapprove_mr'
do
describe
'.unapprove_mr'
do
let
(
:noteable
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:noteable
)
{
create
(
:merge_request
,
source_project:
project
)
}
subject
{
described_class
.
unapprove_mr
(
noteable
,
author
)
}
subject
{
described_class
.
unapprove_mr
(
noteable
,
author
)
}
it_behaves_like
'a system note'
do
it_behaves_like
'a system note'
do
...
@@ -1274,7 +1274,7 @@ describe SystemNoteService do
...
@@ -1274,7 +1274,7 @@ describe SystemNoteService do
let
(
:project
)
{
nil
}
let
(
:project
)
{
nil
}
context
'issue added to an epic'
do
context
'issue added to an epic'
do
subject
{
described_class
.
epic_issue
(
epic
,
issue
,
author
,
:added
)
}
subject
{
described_class
.
epic_issue
(
epic
,
issue
,
author
,
:added
)
}
it_behaves_like
'a system note'
do
it_behaves_like
'a system note'
do
let
(
:action
)
{
'epic_issue_added'
}
let
(
:action
)
{
'epic_issue_added'
}
...
@@ -1286,7 +1286,7 @@ describe SystemNoteService do
...
@@ -1286,7 +1286,7 @@ describe SystemNoteService do
end
end
context
'issue removed from an epic'
do
context
'issue removed from an epic'
do
subject
{
described_class
.
epic_issue
(
epic
,
issue
,
author
,
:removed
)
}
subject
{
described_class
.
epic_issue
(
epic
,
issue
,
author
,
:removed
)
}
it_behaves_like
'a system note'
do
it_behaves_like
'a system note'
do
let
(
:action
)
{
'epic_issue_removed'
}
let
(
:action
)
{
'epic_issue_removed'
}
...
@@ -1307,7 +1307,7 @@ describe SystemNoteService do
...
@@ -1307,7 +1307,7 @@ describe SystemNoteService do
describe
'.issue_on_epic'
do
describe
'.issue_on_epic'
do
context
'issue added to an epic'
do
context
'issue added to an epic'
do
subject
{
described_class
.
issue_on_epic
(
issue
,
epic
,
author
,
:added
)
}
subject
{
described_class
.
issue_on_epic
(
issue
,
epic
,
author
,
:added
)
}
it_behaves_like
'a system note'
do
it_behaves_like
'a system note'
do
let
(
:action
)
{
'issue_added_to_epic'
}
let
(
:action
)
{
'issue_added_to_epic'
}
...
@@ -1319,7 +1319,7 @@ describe SystemNoteService do
...
@@ -1319,7 +1319,7 @@ describe SystemNoteService do
end
end
context
'issue removed from an epic'
do
context
'issue removed from an epic'
do
subject
{
described_class
.
issue_on_epic
(
issue
,
epic
,
author
,
:removed
)
}
subject
{
described_class
.
issue_on_epic
(
issue
,
epic
,
author
,
:removed
)
}
it_behaves_like
'a system note'
do
it_behaves_like
'a system note'
do
let
(
:action
)
{
'issue_removed_from_epic'
}
let
(
:action
)
{
'issue_removed_from_epic'
}
...
...
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