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
144b082b
Commit
144b082b
authored
Jan 18, 2022
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add locking and test case
parent
aa91697c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb
...emove_requirements_management_test_reports_build_id_fk.rb
+1
-0
ee/spec/models/requirements_management/test_report_spec.rb
ee/spec/models/requirements_management/test_report_spec.rb
+5
-0
No files found.
db/post_migrate/20220110231420_remove_requirements_management_test_reports_build_id_fk.rb
View file @
144b082b
...
...
@@ -7,6 +7,7 @@ class RemoveRequirementsManagementTestReportsBuildIdFk < Gitlab::Database::Migra
def
up
with_lock_retries
do
execute
(
'LOCK ci_builds, requirements_management_test_reports IN ACCESS EXCLUSIVE MODE'
)
remove_foreign_key_if_exists
(
:requirements_management_test_reports
,
:ci_builds
,
name:
CONSTRAINT_NAME
)
end
end
...
...
ee/spec/models/requirements_management/test_report_spec.rb
View file @
144b082b
...
...
@@ -168,4 +168,9 @@ RSpec.describe RequirementsManagement::TestReport do
end
end
end
it_behaves_like
'cleanup by a loose foreign key'
do
let!
(
:model
)
{
create
(
:test_report
)
}
let
(
:parent
)
{
model
.
build
}
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