diff options
author | Eric Wong <e@80x24.org> | 2015-01-16 03:09:09 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-16 03:10:07 +0000 |
commit | 63cc3ee529250a6b09dd7e032dc73ec509000c0f (patch) | |
tree | 564f21756c31d3774e6a746661bb2b3699306239 /test/integration.rb | |
parent | b1f366f2b764654d0dd1460369531e420b8b988c (diff) | |
download | mogilefs-client-63cc3ee529250a6b09dd7e032dc73ec509000c0f.tar.gz |
This should make it easier to fully test on machines without access to an existing MogileFS instance. You'll still need mogilefsd and mogstored available, however, but these tests are skipped on machines without them.
Diffstat (limited to 'test/integration.rb')
-rw-r--r-- | test/integration.rb | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/integration.rb b/test/integration.rb deleted file mode 100644 index a0c876b..0000000 --- a/test/integration.rb +++ /dev/null @@ -1,43 +0,0 @@ -# -*- encoding: binary -*- -require './test/exec' - -class TestMogIntegration < Test::Unit::TestCase - include TestExec - - def test_dummy - assert true, "Ruby 1.8 Test::Unit is broken" - end unless defined?(MiniTest) - - def setup - @to_close = [] - @trackers = ENV["MOG_TEST_TRACKERS"].split(/,/) - domain = "rbmogtest#{Time.now.strftime('%Y%m%d%H%M%S')}.#{uuid}" - @admin = MogileFS::Admin.new(:hosts => @trackers) - @admin.create_domain(domain) - yield_for_monitor_update do - @admin.get_domains.include?(domain) and break - end - @domain = domain - end - - def teardown - if defined?(@domain) - client = MogileFS::MogileFS.new :hosts => @trackers, :domain => @domain - client.each_key("") { |key| - p [ :delete, key ] if $VERBOSE - client.delete(key) - } - assert_equal true, @admin.delete_domain(@domain) - assert_raises(MogileFS::Backend::DomainNotFoundError) do - @admin.delete_domain(@domain) - end - end - @to_close.each do |io| - io.closed? or io.close - end - end -end if ENV["MOG_TEST_TRACKERS"] - -class TestMogIntegration - warn "MOG_TEST_TRACKERS not defined" -end unless ENV["MOG_TEST_TRACKERS"] |