summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-09 22:55:06 +0300
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-09 22:55:06 +0300
commit42343194a524b254bfa10337318e489af914060c (patch)
tree30e9575415e2f80a3e97af7d89917ab297530ae3 /db
parent98e2719c341308fb44b1ae24a8ad5b51e74e5820 (diff)
downloadgitlab-ce-42343194a524b254bfa10337318e489af914060c.tar.gz
tests seed
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/test/001_repo.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/db/fixtures/test/001_repo.rb b/db/fixtures/test/001_repo.rb
index 034596f1cbf..3eb4c299b4a 100644
--- a/db/fixtures/test/001_repo.rb
+++ b/db/fixtures/test/001_repo.rb
@@ -1,8 +1,11 @@
-# Clone repo
-`cp spec/seed_project.tar.gz /tmp/`
-Dir.chdir("/tmp")
+# 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 /tmp/legit/ /tmp/legit_#{i}/`
-puts "Unpacked seed repo - /tmp/legit_#{i}"
+`cp -r legit/ legit_#{i}/`
+puts "Unpacked seed repo - tmp/tests/legit_#{i}"
end