[Groonga-commit] droonga/fluent-plugin-droonga at b0c72cf [master] Re-support running command tests with catalog version1

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Feb 26 17:40:32 JST 2014


Kouhei Sutou	2014-02-26 17:40:32 +0900 (Wed, 26 Feb 2014)

  New Revision: b0c72cf4741a9a05a35d349f98bdedfa22c056a7
  https://github.com/droonga/fluent-plugin-droonga/commit/b0c72cf4741a9a05a35d349f98bdedfa22c056a7

  Message:
    Re-support running command tests with catalog version1

  Added files:
    test/command/config/version1/catalog.json
    test/command/config/version1/fluentd.conf
  Modified files:
    Rakefile

  Modified: Rakefile (+20 -4)
===================================================================
--- Rakefile    2014-02-26 17:36:20 +0900 (55ee105)
+++ Rakefile    2014-02-26 17:40:32 +0900 (d478bad)
@@ -29,19 +29,35 @@ Packnga::DocumentTask.new(spec) do |task|
   task.translate_languages = ["ja"]
 end
 
+def run_command_test(*options)
+  ruby(File.join(File.dirname(__FILE__), "test", "command", "run-test.rb",),
+       *options)
+end
+
 namespace :test do
   desc "Run unit test"
   task :unit do
     ruby(File.join(File.dirname(__FILE__), "test", "unit", "run-test.rb"))
   end
 
-  desc "Run command test"
-  task :command do
-    ruby(File.join(File.dirname(__FILE__), "test", "command", "run-test.rb"))
+  namespace :command do
+    desc "Run command test: default"
+    task :default do
+      run_command_test
+    end
+
+    desc "Run command test: version1"
+    task :version1 do
+      run_command_test("--config", "version1")
+    end
   end
 end
 
 desc "Run test"
-task :test => ["test:unit", "test:command"]
+task :test => [
+  "test:unit",
+  "test:command:default",
+  "test:command:version1",
+]
 
 task :default => :test

  Added: test/command/config/version1/catalog.json (+61 -0) 100644
===================================================================
--- /dev/null
+++ test/command/config/version1/catalog.json    2014-02-26 17:40:32 +0900 (17bcb91)
@@ -0,0 +1,61 @@
+{
+  "version": 1,
+  "effective_date": "2013-09-01T00:00:00Z",
+  "zones": ["localhost:23003/droonga"],
+  "farms": {
+    "localhost:23003/droonga": {
+      "device": ".",
+      "capacity": 10
+    }
+  },
+  "datasets": {
+    "Droonga": {
+      "workers": 4,
+      "plugins": ["groonga", "crud", "search"],
+      "number_of_replicas": 2,
+      "number_of_partitions": 3,
+      "partition_key": "_key",
+      "date_range": "infinity",
+      "ring": {
+        "localhost:23041": {
+          "weight": 50,
+          "partitions": {
+            "2013-09-01": [
+              "localhost:23003/droonga.000",
+              "localhost:23003/droonga.001",
+              "localhost:23003/droonga.002"
+            ]
+          }
+        },
+        "localhost:23042": {
+          "weight": 50,
+          "partitions": {
+            "2013-09-01": [
+              "localhost:23003/droonga.010",
+              "localhost:23003/droonga.011",
+              "localhost:23003/droonga.012"
+            ]
+          }
+        }
+      }
+    },
+    "Watch": {
+      "workers": 4,
+      "plugins": ["groonga", "watch", "search", "crud"],
+      "number_of_replicas": 1,
+      "number_of_partitions": 1,
+      "partition_key": "_key",
+      "date_range": "infinity",
+      "ring": {
+        "localhost:23041": {
+          "weight": 50,
+          "partitions": {
+            "2013-09-01": [
+              "localhost:23003/droonga.watch"
+            ]
+          }
+        }
+      }
+    }
+  }
+}

  Added: test/command/config/version1/fluentd.conf (+11 -0) 100644
===================================================================
--- /dev/null
+++ test/command/config/version1/fluentd.conf    2014-02-26 17:40:32 +0900 (1e26357)
@@ -0,0 +1,11 @@
+<source>
+  type forward
+  port 23003
+</source>
+<match droonga.message>
+  name localhost:23003/droonga
+  type droonga
+</match>
+<match output.message>
+  type stdout
+</match>
-------------- next part --------------
HTML����������������������������...
Download 



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