lib/grntest/tester.rb in grntest-1.3.4 vs lib/grntest/tester.rb in grntest-1.3.5

- old
+ new

@@ -63,10 +63,25 @@ "[#{available_interface_labels}]", "(#{tester.interface})") do |interface| tester.interface = interface end + parser.on("--[no-]use-http-post", + "Use POST to send command by HTTP", + "(#{tester.use_http_post?})") do |boolean| + tester.use_http_post = boolean + end + + available_input_types = ["json", "apache-arrow"] + available_input_type_labels = available_input_types.join(", ") + parser.on("--input-type=TYPE", available_input_types, + "Use TYPE as the input type on load", + "[#{available_input_type_labels}]", + "(#{tester.input_type})") do |type| + tester.input_type = type + end + available_output_types = ["json", "msgpack"] available_output_type_labels = available_output_types.join(", ") parser.on("--output-type=TYPE", available_output_types, "Use TYPE as the output type", "[#{available_output_type_labels}]", @@ -275,11 +290,15 @@ end end end attr_accessor :groonga, :groonga_httpd, :groonga_suggest_create_dataset - attr_accessor :interface, :output_type, :testee + attr_accessor :interface + attr_writer :use_http_post + attr_accessor :input_type + attr_accessor :output_type + attr_accessor :testee attr_accessor :base_directory, :database_path, :diff, :diff_options attr_accessor :n_workers attr_accessor :output attr_accessor :gdb, :default_gdb attr_accessor :valgrind, :default_valgrind @@ -301,10 +320,12 @@ @groonga_suggest_create_dataset = "groonga-suggest-create-dataset" unless command_exist?(@groonga_suggest_create_dataset) @groonga_suggest_create_dataset = nil end @interface = :stdio + @use_http_post = false + @input_type = "json" @output_type = "json" @testee = "groonga" @base_directory = Pathname(".") @database_path = nil @reporter = nil @@ -345,9 +366,13 @@ :inplace end else @reporter end + end + + def use_http_post? + @use_http_post end def keep_database? @keep_database end