about summary refs log tree commit homepage
path: root/test/mgmt.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-02-05 09:10:53 +0000
committerEric Wong <normalperson@yhbt.net>2012-02-05 09:11:44 +0000
commit54027f16575424152c87252ab0ecd3cb0c8606f6 (patch)
tree33c333a3789d7542a451026a6aaa18c9ebc2cc5a /test/mgmt.rb
parentc1e93325118082b97891003267f5883ed7ac2a95 (diff)
downloadcmogstored-54027f16575424152c87252ab0ecd3cb0c8606f6.tar.gz
Apparently we can't use random addresses in the 127.0.0.0/8
range under FreeBSD 8.2, so just restrict this to Linux
for now.
Diffstat (limited to 'test/mgmt.rb')
-rwxr-xr-xtest/mgmt.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/mgmt.rb b/test/mgmt.rb
index 7d15545..dc2561c 100755
--- a/test/mgmt.rb
+++ b/test/mgmt.rb
@@ -2,19 +2,14 @@
 # -*- encoding: binary -*-
 # Copyright (C) 2012, Eric Wong <normalperson@yhbt.net>
 # License: GPLv3 or later (see COPYING for details)
-require 'test/unit'
-require 'tmpdir'
-require 'tempfile'
-require 'fileutils'
+require './test/helper'
 require 'digest/md5'
-require 'socket'
-$stderr.sync = $stdout.sync = Thread.abort_on_exception = true
 
 class TestMgmt < Test::Unit::TestCase
   def setup
     @tmpdir = Dir.mktmpdir('cmogstored-mgmt-test')
     @to_close = []
-    @host = "127.#{rand(256)}.#{rand(256)}.#{rand(256)}"
+    @host = TEST_HOST
     srv = TCPServer.new(@host, 0)
     @port = srv.addr[1]
     srv.close