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
3a6ba833
Commit
3a6ba833
authored
Mar 06, 2021
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cop FactoryBot/InlineAssociation offenses for geo event log
parent
49fbb1a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-1
ee/spec/factories/geo/event_log.rb
ee/spec/factories/geo/event_log.rb
+14
-14
No files found.
.rubocop_manual_todo.yml
View file @
3a6ba833
...
...
@@ -44,7 +44,6 @@ Graphql/Descriptions:
# WIP See https://gitlab.com/gitlab-org/gitlab/-/issues/267606
FactoryBot/InlineAssociation
:
Exclude
:
-
'
ee/spec/factories/geo/event_log.rb'
-
'
ee/spec/factories/merge_request_blocks.rb'
-
'
ee/spec/factories/vulnerabilities/feedback.rb'
-
'
spec/factories/atlassian_identities.rb'
...
...
ee/spec/factories/geo/event_log.rb
View file @
3a6ba833
...
...
@@ -97,37 +97,37 @@ FactoryBot.define do
end
factory
:geo_repository_renamed_event
,
class:
'Geo::RepositoryRenamedEvent'
do
project
{
create
(
:project
,
:repository
)
}
project
{
association
(
:project
,
:repository
)
}
repository_storage_name
{
project
.
repository_storage
}
old_path_with_namespace
{
project
.
path_with_namespace
}
new_path_with_namespace
{
project
.
path_with_namespace
+
'_new'
}
new_path_with_namespace
{
"
#{
project
.
path_with_namespace
}
_new"
}
old_wiki_path_with_namespace
{
project
.
wiki
.
path_with_namespace
}
new_wiki_path_with_namespace
{
project
.
wiki
.
path_with_namespace
+
'_new'
}
new_wiki_path_with_namespace
{
"
#{
project
.
wiki
.
path_with_namespace
}
_new"
}
old_path
{
project
.
path
}
new_path
{
project
.
path
+
'_new'
}
new_path
{
"
#{
project
.
path
}
_new"
}
end
factory
:geo_hashed_storage_migrated_event
,
class:
'Geo::HashedStorageMigratedEvent'
do
project
{
create
(
:project
,
:repository
)
}
project
{
association
(
:project
,
:repository
)
}
repository_storage_name
{
project
.
repository_storage
}
old_disk_path
{
project
.
path_with_namespace
}
new_disk_path
{
project
.
path_with_namespace
+
'_new'
}
new_disk_path
{
"
#{
project
.
path_with_namespace
}
_new"
}
old_wiki_disk_path
{
project
.
wiki
.
path_with_namespace
}
new_wiki_disk_path
{
project
.
wiki
.
path_with_namespace
+
'_new'
}
new_wiki_disk_path
{
"
#{
project
.
wiki
.
path_with_namespace
}
_new"
}
new_storage_version
{
Project
::
HASHED_STORAGE_FEATURES
[
:repository
]
}
end
factory
:geo_hashed_storage_attachments_event
,
class:
'Geo::HashedStorageAttachmentsEvent'
do
project
{
create
(
:project
,
:repository
)
}
project
{
association
(
:project
,
:repository
)
}
old_attachments_path
{
Storage
::
LegacyProject
.
new
(
project
).
disk_path
}
new_attachments_path
{
Storage
::
Hashed
.
new
(
project
).
disk_path
}
end
factory
:geo_lfs_object_deleted_event
,
class:
'Geo::LfsObjectDeletedEvent'
do
lfs_object
{
create
(
:lfs_object
,
:with_file
)
}
lfs_object
{
association
(
:lfs_object
,
:with_file
)
}
after
(
:build
,
:stub
)
do
|
event
,
_
|
local_store_path
=
Pathname
.
new
(
LfsObjectUploader
.
root
)
...
...
@@ -139,7 +139,7 @@ FactoryBot.define do
end
factory
:geo_job_artifact_deleted_event
,
class:
'Geo::JobArtifactDeletedEvent'
do
job_artifact
{
create
(
:ci_job_artifact
,
:archive
)
}
job_artifact
{
association
(
:ci_job_artifact
,
:archive
)
}
after
(
:build
,
:stub
)
do
|
event
,
_
|
local_store_path
=
Pathname
.
new
(
JobArtifactUploader
.
root
)
...
...
@@ -150,22 +150,22 @@ FactoryBot.define do
end
factory
:geo_upload_deleted_event
,
class:
'Geo::UploadDeletedEvent'
do
upload
{
create
(
:upload
)
}
upload
{
association
(
:upload
)
}
file_path
{
upload
.
path
}
model_id
{
upload
.
model_id
}
model_type
{
upload
.
model_type
}
uploader
{
upload
.
uploader
}
trait
:issuable_upload
do
upload
{
create
(
:upload
,
:issuable_upload
)
}
upload
{
association
(
:upload
,
:issuable_upload
)
}
end
trait
:personal_snippet
do
upload
{
create
(
:upload
,
:personal_snippet
)
}
upload
{
association
(
:upload
,
:personal_snippet
)
}
end
trait
:namespace_upload
do
upload
{
create
(
:upload
,
:namespace_upload
)
}
upload
{
association
(
:upload
,
:namespace_upload
)
}
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