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
a3a63eeb
Commit
a3a63eeb
authored
Aug 28, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all instances to 'gitlabhq_x' seed repositories from specs and features
We now need only one seed repo! Also cleans up the seeding script.
parent
a39cfb54
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
30 deletions
+30
-30
001_repo.rb
db/fixtures/test/001_repo.rb
+22
-14
dashboard_steps.rb
features/step_definitions/dashboard_steps.rb
+2
-6
project_spec.rb
spec/models/project_spec.rb
+1
-1
admin_projects_spec.rb
spec/requests/admin/admin_projects_spec.rb
+1
-1
dashboard_issues_spec.rb
spec/requests/atom/dashboard_issues_spec.rb
+2
-6
stubbed_repository.rb
spec/support/stubbed_repository.rb
+2
-2
No files found.
db/fixtures/test/001_repo.rb
View file @
a3a63eeb
# create tmp dir if not exist
tmp_dir
=
File
.
join
(
Rails
.
root
,
"tmp"
)
Dir
.
mkdir
(
tmp_dir
)
unless
File
.
exists?
(
tmp_dir
)
# Create dir for test repo
repo_dir
=
File
.
join
(
Rails
.
root
,
"tmp"
,
"tests"
)
Dir
.
mkdir
(
repo_dir
)
unless
File
.
exists?
(
repo_dir
)
`cp spec/seed_project.tar.gz tmp/tests/`
Dir
.
chdir
(
repo_dir
)
`tar -xf seed_project.tar.gz`
3
.
times
do
|
i
|
`cp -r gitlabhq/ gitlabhq_
#{
i
}
/`
puts
"Unpacked seed repo - tmp/tests/gitlabhq_
#{
i
}
"
require
'fileutils'
print
"Unpacking seed repository..."
SEED_REPO
=
'seed_project.tar.gz'
REPO_PATH
=
File
.
join
(
Rails
.
root
,
'tmp'
,
'repositories'
)
# Make whatever directories we need to make
FileUtils
.
mkdir_p
(
REPO_PATH
)
# Copy the archive to the repo path
FileUtils
.
cp
(
File
.
join
(
Rails
.
root
,
'spec'
,
SEED_REPO
),
REPO_PATH
)
# chdir to the repo path
FileUtils
.
cd
(
REPO_PATH
)
do
# Extract the archive
`tar -xf
#{
SEED_REPO
}
`
# Remove the copy
FileUtils
.
rm
(
SEED_REPO
)
end
puts
' done.'
features/step_definitions/dashboard_steps.rb
View file @
a3a63eeb
...
...
@@ -106,13 +106,9 @@ Given /^I have assigned issues$/ do
end
Given
/^I have authored merge requests$/
do
project1
=
Factory
:project
,
:path
=>
"gitlabhq_1"
,
:code
=>
"gitlabhq_1"
project1
=
Factory
:project
project2
=
Factory
:project
,
:path
=>
"gitlabhq_2"
,
:code
=>
"gitlabhq_2"
project2
=
Factory
:project
project1
.
add_access
(
@user
,
:read
,
:write
)
project2
.
add_access
(
@user
,
:read
,
:write
)
...
...
spec/models/project_spec.rb
View file @
a3a63eeb
...
...
@@ -85,7 +85,7 @@ describe Project do
it
"should return path to repo"
do
project
=
Project
.
new
(
path:
"somewhere"
)
project
.
path_to_repo
.
should
==
File
.
join
(
Rails
.
root
,
"tmp"
,
"
test
s"
,
"somewhere"
)
project
.
path_to_repo
.
should
==
File
.
join
(
Rails
.
root
,
"tmp"
,
"
repositorie
s"
,
"somewhere"
)
end
it
"returns the full web URL for this repo"
do
...
...
spec/requests/admin/admin_projects_spec.rb
View file @
a3a63eeb
...
...
@@ -87,7 +87,7 @@ describe "Admin::Projects" do
visit
new_admin_project_path
fill_in
'project_name'
,
with:
'NewProject'
fill_in
'project_code'
,
with:
'NPR'
fill_in
'project_path'
,
with:
'
gitlabhq_1
'
fill_in
'project_path'
,
with:
'
newproject
'
expect
{
click_button
"Create project"
}.
to
change
{
Project
.
count
}.
by
(
1
)
@project
=
Project
.
last
end
...
...
spec/requests/atom/dashboard_issues_spec.rb
View file @
a3a63eeb
...
...
@@ -6,13 +6,9 @@ describe "User Issues Dashboard" do
login_as
:user
@project1
=
Factory
:project
,
path:
"gitlabhq_0"
,
code:
"TEST1"
@project1
=
Factory
:project
@project2
=
Factory
:project
,
path:
"gitlabhq_1"
,
code:
"TEST2"
@project2
=
Factory
:project
@project1
.
add_access
(
@user
,
:read
,
:write
)
@project2
.
add_access
(
@user
,
:read
,
:write
)
...
...
spec/support/stubbed_repository.rb
View file @
a3a63eeb
...
...
@@ -17,11 +17,11 @@ module StubbedRepository
if
new_record?
||
path
==
'newproject'
# There are a couple Project specs and features that expect the Project's
# path to be in the returned path, so let's patronize them.
File
.
join
(
Rails
.
root
,
'tmp'
,
'
test
s'
,
path
)
File
.
join
(
Rails
.
root
,
'tmp'
,
'
repositorie
s'
,
path
)
else
# For everything else, just give it the path to one of our real seeded
# repos.
File
.
join
(
Rails
.
root
,
'tmp'
,
'
tests'
,
'gitlabhq_0
'
)
File
.
join
(
Rails
.
root
,
'tmp'
,
'
repositories'
,
'gitlabhq
'
)
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