projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '13888-cli-dependency-on-api'
[arvados.git]
/
services
/
api
/
test
/
helpers
/
git_test_helper.rb
diff --git
a/services/api/test/helpers/git_test_helper.rb
b/services/api/test/helpers/git_test_helper.rb
index 673e0e248fd0e5e63fbe95a97f85a6d7a2cd3b79..170b59ee1e10d833fd3a0cb0fb6a6aef87bbc123 100644
(file)
--- a/
services/api/test/helpers/git_test_helper.rb
+++ b/
services/api/test/helpers/git_test_helper.rb
@@
-26,19
+26,13
@@
module GitTestHelper
FileUtils.mkdir_p @tmpdir
system("tar", "-xC", @tmpdir.to_s, "-f", "test/test.git.tar")
Rails.configuration.git_repositories_dir = "#{@tmpdir}/test"
FileUtils.mkdir_p @tmpdir
system("tar", "-xC", @tmpdir.to_s, "-f", "test/test.git.tar")
Rails.configuration.git_repositories_dir = "#{@tmpdir}/test"
-
- # Initialize an empty internal git repo.
- intdir =
- Rails.configuration.git_internal_dir =
- Rails.root.join(@tmpdir, 'internal.git').to_s
- FileUtils.mkdir_p intdir
- IO.read("|git --git-dir #{intdir.shellescape} init")
- assert $?.success?
+ Rails.configuration.git_internal_dir = "#{@tmpdir}/internal.git"
end
base.teardown do
end
base.teardown do
- FileUtils.remove_entry @tmpdir, true
FileUtils.remove_entry Commit.cache_dir_base, true
FileUtils.remove_entry Commit.cache_dir_base, true
+ FileUtils.mkdir_p @tmpdir
+ system("tar", "-xC", @tmpdir.to_s, "-f", "test/test.git.tar")
end
end
end
end