Skip to content
Browse files

allow keeping around test repos for debugging

  • Loading branch information...
1 parent 261edde commit 82990d656b6df2e92905eb4ca6611c08c55eeaf6 @technomancy committed Jul 24, 2008
Showing with 5 additions and 4 deletions.
  1. +1 −1 lib/conspire/gitjour_exts.rb
  2. +4 −3 test/test_conspire.rb
View
2 lib/conspire/gitjour_exts.rb
@@ -5,7 +5,7 @@ class << self
def init(path)
abort "Repository already exists: #{path}" if File.exist? path + '/.git'
- at_exit { FileUtils.rm_rf path + '/.git' }
+ at_exit { FileUtils.rm_rf path + '/.git' } unless ENV['KEEP']
`mkdir -p #{path} && cd #{path} && git init`
`touch #{path}/.git/git-daemon-export-ok`
end
View
7 test/test_conspire.rb
@@ -30,15 +30,16 @@ def setup
end
Conspire.start(LOCAL_SPACE, OpenStruct.new(:port => 7457,
- :name => 'conspiracy'))
+ :name => 'conspiracy',
+ :sync_interval => 0.5))
end
def teardown
@remote_thread.kill
`killall git-daemon` # workaround until gitjour handles this correctly
Conspire.reset!
- FileUtils.rm_rf(REMOTE_SPACE)
- FileUtils.rm_rf(LOCAL_SPACE)
+ FileUtils.rm_rf(REMOTE_SPACE) unless ENV['KEEP']
+ FileUtils.rm_rf(LOCAL_SPACE) unless ENV['KEEP']
end
def test_start

0 comments on commit 82990d6

Please sign in to comment.
Something went wrong with that request. Please try again.