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
70b50d77
Commit
70b50d77
authored
Feb 19, 2020
by
Henrik Christian Grove
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better path handling in specs
parent
2bce8172
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
lib/backup/manager.rb
lib/backup/manager.rb
+1
-1
spec/lib/backup/manager_spec.rb
spec/lib/backup/manager_spec.rb
+3
-9
No files found.
lib/backup/manager.rb
View file @
70b50d77
...
@@ -264,7 +264,7 @@ module Backup
...
@@ -264,7 +264,7 @@ module Backup
def
create_attributes
def
create_attributes
attrs
=
{
attrs
=
{
key:
remote_target
,
key:
remote_target
,
body:
File
.
open
(
tar_file
),
body:
File
.
open
(
"
#{
backup_path
}
/
#{
tar_file
}
"
),
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
multipart_chunk_size:
Gitlab
.
config
.
backup
.
upload
.
multipart_chunk_size
,
encryption:
Gitlab
.
config
.
backup
.
upload
.
encryption
,
encryption:
Gitlab
.
config
.
backup
.
upload
.
encryption
,
encryption_key:
Gitlab
.
config
.
backup
.
upload
.
encryption_key
,
encryption_key:
Gitlab
.
config
.
backup
.
upload
.
encryption_key
,
...
...
spec/lib/backup/manager_spec.rb
View file @
70b50d77
...
@@ -329,10 +329,8 @@ describe Backup::Manager do
...
@@ -329,10 +329,8 @@ describe Backup::Manager do
.
with
(
hash_including
(
key:
backup_filename
,
public:
false
))
.
with
(
hash_including
(
key:
backup_filename
,
public:
false
))
.
and_return
(
true
)
.
and_return
(
true
)
Dir
.
chdir
(
Gitlab
.
config
.
backup
.
path
)
do
subject
.
upload
subject
.
upload
end
end
end
it
'adds the DIRECTORY environment variable if present'
do
it
'adds the DIRECTORY environment variable if present'
do
stub_env
(
'DIRECTORY'
,
'daily'
)
stub_env
(
'DIRECTORY'
,
'daily'
)
...
@@ -341,11 +339,9 @@ describe Backup::Manager do
...
@@ -341,11 +339,9 @@ describe Backup::Manager do
.
with
(
hash_including
(
key:
"daily/
#{
backup_filename
}
"
,
public:
false
))
.
with
(
hash_including
(
key:
"daily/
#{
backup_filename
}
"
,
public:
false
))
.
and_return
(
true
)
.
and_return
(
true
)
Dir
.
chdir
(
Gitlab
.
config
.
backup
.
path
)
do
subject
.
upload
subject
.
upload
end
end
end
end
end
context
'with Google provider'
do
context
'with Google provider'
do
before
do
before
do
...
@@ -373,10 +369,8 @@ describe Backup::Manager do
...
@@ -373,10 +369,8 @@ describe Backup::Manager do
.
with
(
hash_excluding
(
public:
false
))
.
with
(
hash_excluding
(
public:
false
))
.
and_return
(
true
)
.
and_return
(
true
)
Dir
.
chdir
(
Gitlab
.
config
.
backup
.
path
)
do
subject
.
upload
subject
.
upload
end
end
end
end
end
end
end
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