[Groonga-commit] droonga/droonga-engine at 1710f65 [master] Add test for EngineState#local_route?

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Thu Apr 30 15:47:58 JST 2015


YUKI Hiroshi	2015-04-30 15:47:58 +0900 (Thu, 30 Apr 2015)

  New Revision: 1710f650b8a31a60020b3cb889210aa47784503b
  https://github.com/droonga/droonga-engine/commit/1710f650b8a31a60020b3cb889210aa47784503b

  Message:
    Add test for EngineState#local_route?

  Modified files:
    test/unit/test_engine_state.rb

  Modified: test/unit/test_engine_state.rb (+14 -0)
===================================================================
--- test/unit/test_engine_state.rb    2015-04-30 15:45:00 +0900 (d7adac6)
+++ test/unit/test_engine_state.rb    2015-04-30 15:47:58 +0900 (21e038f)
@@ -35,6 +35,20 @@ class EngineStateTest < Test::Unit::TestCase
                              :internal_name => INTERNAL_NODE_NAME)
   end
 
+  data(:public => PUBLIC_NODE_NAME,
+       :internal => INTERNAL_NODE_NAME,
+       :public_with_local => "#{PUBLIC_NODE_NAME}.\#1",
+       :internal_with_local => "#{INTERNAL_NODE_NAME}.\#1")
+  def test_local_route(route)
+    assert_true(@state.local_route?(route))
+  end
+
+  data(:foreign => "node30:2929/droonga",
+       :foreign_with_logal => "node30:2929/droonga.\#1")
+  def test_not_local_route(route)
+    assert_false(@state.local_route?(route))
+  end
+
   data(:public => {
          :route    => PUBLIC_NODE_NAME,
          :expected => INTERNAL_NODE_NAME,
-------------- next part --------------
HTML����������������������������...
ダウンロード 



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