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
3325d9cd
Commit
3325d9cd
authored
Jul 19, 2021
by
DJ Mountney
Committed by
David Fernandez
Jul 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't fail db restore for warnings
parent
7c8c5936
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
lib/backup/database.rb
lib/backup/database.rb
+2
-0
spec/lib/backup/database_spec.rb
spec/lib/backup/database_spec.rb
+1
-1
No files found.
lib/backup/database.rb
View file @
3325d9cd
...
...
@@ -9,6 +9,8 @@ module Backup
attr_reader
:config
,
:db_file_name
IGNORED_ERRORS
=
[
# Ignore warnings
/WARNING:/
,
# Ignore the DROP errors; recent database dumps will use --if-exists with pg_dump
/does not exist$/
,
# User may not have permissions to drop extensions or schemas
...
...
spec/lib/backup/database_spec.rb
View file @
3325d9cd
...
...
@@ -38,7 +38,7 @@ RSpec.describe Backup::Database do
context
'when the restore command prints errors'
do
let
(
:visible_error
)
{
"This is a test error
\n
"
}
let
(
:noise
)
{
"Table projects does not exist
\n
must be owner of extension pg_trgm
\n
"
}
let
(
:noise
)
{
"Table projects does not exist
\n
must be owner of extension pg_trgm
\n
WARNING: no privileges could be revoked for public
\n
"
}
let
(
:cmd
)
{
%W[
#{
Gem
.
ruby
}
-e $stderr.write("
#{
noise
}#{
visible_error
}
")]
}
it
'filters out noise from errors'
do
...
...
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