[Groonga-commit] droonga/drntest at 28febaa [master] Use specified host, port, and tag instead of tester's one

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Nov 25 17:51:44 JST 2013


YUKI Hiroshi	2013-11-25 17:51:44 +0900 (Mon, 25 Nov 2013)

  New Revision: 28febaae24a1f5baf9a307adc7d4285fc4046018
  https://github.com/droonga/drntest/commit/28febaae24a1f5baf9a307adc7d4285fc4046018

  Message:
    Use specified host, port, and tag instead of tester's one

  Modified files:
    lib/drntest/test-runner.rb

  Modified: lib/drntest/test-runner.rb (+16 -4)
===================================================================
--- lib/drntest/test-runner.rb    2013-11-25 17:46:42 +0900 (a65606c)
+++ lib/drntest/test-runner.rb    2013-11-25 17:51:44 +0900 (80d43c5)
@@ -28,6 +28,7 @@ module Drntest
     def initialize(owner, target)
       @owner = owner
       @target_path = Pathname(target)
+      @options = load_options
     end
 
     def run
@@ -62,14 +63,25 @@ module Drntest
       @catalog = Pathname(path)
     end
 
+    def port
+      @port || @config[:port] || tester.port
+    end
+
+    def host
+      @host || @config[:host] || tester.host
+    end
+
+    def tag
+      @tag || @config[:tag] || tester.tag
+    end
+
     private
     def prepare
       self.config = owner.config if owner.config
       self.catalog = owner.catalog if owner.catalog
 
-      options = load_options
-      self.config = Pathname(options[:config]) if options[:config]
-      self.catalog = Pathname(options[:catalog]) if options[:catalog]
+      self.config = Pathname(@options[:config]) if @options[:config]
+      self.catalog = Pathname(@options[:catalog]) if @options[:catalog]
     end
 
     def setup
@@ -112,7 +124,7 @@ module Drntest
       results = TestResults.new(target_path)
 
       load_request_envelopes.each do |request|
-        executor = Executor.new(tester, request)
+        executor = Executor.new(self, request)
         results.actuals << executor.execute
       end
       if expected_exist?
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index