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/test_mogtool_bigfile.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/test_mogtool_bigfile.rb')
-rw-r--r-- | test/test_mogtool_bigfile.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_mogtool_bigfile.rb b/test/test_mogtool_bigfile.rb index e424def..01de78e 100644 --- a/test/test_mogtool_bigfile.rb +++ b/test/test_mogtool_bigfile.rb @@ -1,5 +1,5 @@ # -*- encoding: binary -*- -require "./test/integration" +require "./test/fresh" require "net/http" ok = true unless File.executable?(`which mogtool 2>/dev/null`.strip) @@ -7,7 +7,8 @@ unless File.executable?(`which mogtool 2>/dev/null`.strip) ok = false end -class TestMogtoolBigfile < TestMogIntegration +class TestMogtoolBigfile < Test::Unit::TestCase + include TestFreshSetup buf = File.open("/dev/urandom") { |fp| fp.read(1024) } buf *= 1024 RAND = Tempfile.new("rand") @@ -18,7 +19,8 @@ class TestMogtoolBigfile < TestMogIntegration RAND_SHA1 = sha1.hexdigest def setup - super + setup_mogilefs + add_host_device_domain RAND.rewind @big_uuid = "big-#{uuid}" @client = MogileFS::MogileFS.new(:hosts => @trackers, :domain => @domain) |