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
4c9b2c39
Commit
4c9b2c39
authored
Feb 09, 2021
by
Vladimir Shushlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that temp directory is removed
parent
ce4bcf7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
spec/models/pages_deployment_spec.rb
spec/models/pages_deployment_spec.rb
+4
-1
No files found.
spec/models/pages_deployment_spec.rb
View file @
4c9b2c39
...
@@ -53,7 +53,8 @@ RSpec.describe PagesDeployment do
...
@@ -53,7 +53,8 @@ RSpec.describe PagesDeployment do
end
end
def
create_migrated_deployment
(
project
)
def
create_migrated_deployment
(
project
)
FileUtils
.
mkdir_p
File
.
join
(
project
.
pages_path
,
"public"
)
public_path
=
File
.
join
(
project
.
pages_path
,
"public"
)
FileUtils
.
mkdir_p
(
public_path
)
File
.
open
(
File
.
join
(
project
.
pages_path
,
"public/index.html"
),
"w"
)
do
|
f
|
File
.
open
(
File
.
join
(
project
.
pages_path
,
"public/index.html"
),
"w"
)
do
|
f
|
f
.
write
(
"Hello!"
)
f
.
write
(
"Hello!"
)
end
end
...
@@ -61,6 +62,8 @@ RSpec.describe PagesDeployment do
...
@@ -61,6 +62,8 @@ RSpec.describe PagesDeployment do
expect
(
::
Pages
::
MigrateLegacyStorageToDeploymentService
.
new
(
project
).
execute
[
:status
]).
to
eq
(
:success
)
expect
(
::
Pages
::
MigrateLegacyStorageToDeploymentService
.
new
(
project
).
execute
[
:status
]).
to
eq
(
:success
)
project
.
reload
.
pages_metadatum
.
pages_deployment
project
.
reload
.
pages_metadatum
.
pages_deployment
ensure
FileUtils
.
rm_rf
(
public_path
)
end
end
describe
'default for file_store'
do
describe
'default for file_store'
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