about summary refs log tree commit homepage
path: root/test/test_mogilefs_integration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_mogilefs_integration.rb')
-rw-r--r--test/test_mogilefs_integration.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_mogilefs_integration.rb b/test/test_mogilefs_integration.rb
index 610b899..4bc8e27 100644
--- a/test/test_mogilefs_integration.rb
+++ b/test/test_mogilefs_integration.rb
@@ -146,4 +146,20 @@ class TestMogileFSIntegration < TestMogIntegration
       end
     end
   end
+
+  # TODO: move this to a fresh instance
+  def test_admin_each_fid
+    admin = MogileFS::Admin.new(:hosts => @trackers)
+    seen = {}
+    count = admin.each_fid do |info|
+      seen[info["fid"]] = true
+      assert_kind_of Integer, info["fid"]
+      assert_kind_of Integer, info["length"]
+      assert_kind_of Integer, info["devcount"]
+      assert_kind_of String, info["key"]
+      assert_kind_of String, info["class"]
+      assert_kind_of String, info["domain"]
+    end
+    assert_equal count, seen.size
+  end if ENV["TEST_EXPENSIVE"]
 end