[Groonga-commit] droonga/droonga-engine at 89d5b79 [master] Add test for Catalog::Version1#all_nodes

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Fri May 9 12:08:22 JST 2014


YUKI Hiroshi	2014-05-09 12:08:22 +0900 (Fri, 09 May 2014)

  New Revision: 89d5b793ed6e0df5d6983c8803e50aeebfb5c000
  https://github.com/droonga/droonga-engine/commit/89d5b793ed6e0df5d6983c8803e50aeebfb5c000

  Message:
    Add test for Catalog::Version1#all_nodes

  Modified files:
    test/unit/catalog/test_version1.rb
    test/unit/fixtures/catalog/version1.json

  Modified: test/unit/catalog/test_version1.rb (+5 -12)
===================================================================
--- test/unit/catalog/test_version1.rb    2014-05-09 11:50:56 +0900 (50d76a9)
+++ test/unit/catalog/test_version1.rb    2014-05-09 12:08:22 +0900 (64abd63)
@@ -51,28 +51,21 @@ class CatalogVersion1Test < Test::Unit::TestCase
                        :plugins   => ["for_dataset"],
                        :n_workers => 0
                      },
-                     "localhost:23003/test.001" => {
-                       :database  => "#{base_path}/001/db",
-                       :dataset   => "Test",
-                       :plugins   => ["for_dataset"],
-                       :n_workers => 0
-                     },
                      "localhost:23003/test.002" => {
                        :database  => "#{base_path}/002/db",
                        :dataset   => "Test",
                        :plugins   => ["for_dataset"],
                        :n_workers => 0
                      },
-                     "localhost:23003/test.003" => {
-                       :database  => "#{base_path}/003/db",
-                       :dataset   => "Test",
-                       :plugins   => ["for_dataset"],
-                       :n_workers => 0
-                     },
                    },
                    partitions)
     end
 
+    def test_all_nodes
+      assert_equal(["localhost:23004", "localhost:23003"],
+                   @catalog.all_nodes)
+    end
+
     def fixture_path(base_path)
       File.expand_path("../../fixtures/#{base_path}", __FILE__)
     end

  Modified: test/unit/fixtures/catalog/version1.json (+6 -2)
===================================================================
--- test/unit/fixtures/catalog/version1.json    2014-05-09 11:50:56 +0900 (e7a2e37)
+++ test/unit/fixtures/catalog/version1.json    2014-05-09 12:08:22 +0900 (98233d0)
@@ -5,6 +5,10 @@
     "localhost:23003/test": {
       "device": ".",
       "capacity": 10
+    },
+    "localhost:23004/test": {
+      "device": ".",
+      "capacity": 10
     }
   },
   "datasets": {
@@ -21,7 +25,7 @@
           "partitions": {
             "2013-09-01": [
               "localhost:23003/test.000",
-              "localhost:23003/test.001"
+              "localhost:23004/test.001"
             ]
           }
         },
@@ -30,7 +34,7 @@
           "partitions": {
             "2013-09-01": [
               "localhost:23003/test.002",
-              "localhost:23003/test.003"
+              "localhost:23004/test.003"
             ]
           }
         }
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る