BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
28b6f09f
Commit
28b6f09f
authored
Sep 24, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7823 from cirosantilli/test-fetch-shell
Only clone GitLab Shell on tests if necessary.
parents
0b7377d8
065ab3e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
shell.rake
lib/tasks/gitlab/shell.rake
+4
-1
test_env.rb
spec/support/test_env.rb
+6
-4
No files found.
lib/tasks/gitlab/shell.rake
View file @
28b6f09f
...
...
@@ -22,7 +22,10 @@ namespace :gitlab do
# Make sure we're on the right tag
Dir
.
chdir
(
target_dir
)
do
sh
"git fetch origin && git reset --hard $(git describe
#{
args
.
tag
}
|| git describe origin/
#{
args
.
tag
}
)"
# First try to checkout without fetching
# to avoid stalling tests if the Internet is down.
reset
=
"git reset --hard $(git describe
#{
args
.
tag
}
|| git describe origin/
#{
args
.
tag
}
)"
sh
"
#{
reset
}
|| git fetch origin &&
#{
reset
}
"
config
=
{
user:
user
,
...
...
spec/support/test_env.rb
View file @
28b6f09f
...
...
@@ -17,7 +17,11 @@ module TestEnv
tmp_test_path
=
Rails
.
root
.
join
(
'tmp'
,
'tests'
)
if
File
.
directory?
(
tmp_test_path
)
FileUtils
.
rm_r
(
tmp_test_path
)
Dir
.
entries
(
tmp_test_path
).
each
do
|
entry
|
unless
[
'.'
,
'..'
,
'gitlab-shell'
].
include?
(
entry
)
FileUtils
.
rm_r
(
File
.
join
(
tmp_test_path
,
entry
))
end
end
end
FileUtils
.
mkdir_p
(
tmp_test_path
)
...
...
@@ -38,9 +42,7 @@ module TestEnv
end
def
setup_gitlab_shell
unless
File
.
directory?
(
Gitlab
.
config
.
gitlab_shell
.
path
)
%x[rake gitlab:shell:install]
end
`rake gitlab:shell:install`
end
def
setup_factory_repo
...
...
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