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
7ea4a423
Commit
7ea4a423
authored
May 16, 2018
by
Ahmad Hassan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing specs
parent
889c62c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
26 deletions
+3
-26
spec/lib/backup/repository_spec.rb
spec/lib/backup/repository_spec.rb
+3
-26
No files found.
spec/lib/backup/repository_spec.rb
View file @
7ea4a423
...
@@ -49,14 +49,14 @@ describe Backup::Repository do
...
@@ -49,14 +49,14 @@ describe Backup::Repository do
describe
'command failure'
do
describe
'command failure'
do
before
do
before
do
allow
(
Gitlab
::
Popen
).
to
receive
(
:popen
).
and_return
([
'error'
,
1
]
)
allow
_any_instance_of
(
Gitlab
::
Shell
).
to
receive
(
:create_repository
).
and_return
(
false
)
end
end
context
'hashed storage'
do
context
'hashed storage'
do
it
'shows the appropriate error'
do
it
'shows the appropriate error'
do
subject
.
restore
subject
.
restore
expect
(
progress
).
to
have_received
(
:puts
).
with
(
"
Ignoring error on
#{
project
.
full_path
}
(
#{
project
.
disk_path
}
) - error
"
)
expect
(
progress
).
to
have_received
(
:puts
).
with
(
"
[Failed] restoring
#{
project
.
full_path
}
repository
"
)
end
end
end
end
...
@@ -66,33 +66,10 @@ describe Backup::Repository do
...
@@ -66,33 +66,10 @@ describe Backup::Repository do
it
'shows the appropriate error'
do
it
'shows the appropriate error'
do
subject
.
restore
subject
.
restore
expect
(
progress
).
to
have_received
(
:puts
).
with
(
"
Ignoring error on
#{
project
.
full_path
}
- error
"
)
expect
(
progress
).
to
have_received
(
:puts
).
with
(
"
[Failed] restoring
#{
project
.
full_path
}
repository
"
)
end
end
end
end
end
end
describe
'folders without permissions'
do
before
do
allow
(
FileUtils
).
to
receive
(
:mv
).
and_raise
(
Errno
::
EACCES
)
end
it
'shows error message'
do
expect
(
subject
).
to
receive
(
:access_denied_error
)
subject
.
restore
end
end
describe
'folder that is a mountpoint'
do
before
do
allow
(
FileUtils
).
to
receive
(
:mv
).
and_raise
(
Errno
::
EBUSY
)
end
it
'shows error message'
do
expect
(
subject
).
to
receive
(
:resource_busy_error
).
and_call_original
expect
{
subject
.
restore
}.
to
raise_error
(
/is a mountpoint/
)
end
end
end
end
describe
'#empty_repo?'
do
describe
'#empty_repo?'
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