Kouhei Sutou
null+****@clear*****
Mon May 19 15:32:12 JST 2014
Kouhei Sutou 2014-05-19 15:32:12 +0900 (Mon, 19 May 2014) New Revision: e710cbf4d702a1dd81c967dbabc0583ddd34521a https://github.com/droonga/droonga-engine/commit/e710cbf4d702a1dd81c967dbabc0583ddd34521a Message: test: follow Rroonga's dump change Rroonga removes needless "--key_type" from "table_create" dump. Modified files: test/unit/plugins/groonga/test_column_create.rb test/unit/plugins/groonga/test_column_remove.rb test/unit/plugins/groonga/test_column_rename.rb test/unit/plugins/groonga/test_delete.rb test/unit/plugins/groonga/test_table_create.rb test/unit/plugins/groonga/test_table_remove.rb test/unit/test_schema_applier.rb test/unit/test_watch_schema.rb Modified: test/unit/plugins/groonga/test_column_create.rb (+5 -5) =================================================================== --- test/unit/plugins/groonga/test_column_create.rb 2014-05-19 15:11:45 +0900 (e676281) +++ test/unit/plugins/groonga/test_column_create.rb 2014-05-19 15:32:12 +0900 (55ceeaf) @@ -57,7 +57,7 @@ class ColumnCreateTest < GroongaHandlerTest process(:column_create, {"table" => "Books", "name" => "title", "type" => "ShortText"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books title COLUMN_SCALAR ShortText SCHEMA end @@ -69,7 +69,7 @@ column_create Books title COLUMN_SCALAR ShortText process(:column_create, {"table" => "Books", "name" => "main_text", "type" => "LongText"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books main_text COLUMN_SCALAR LongText SCHEMA end @@ -99,7 +99,7 @@ column_create Books main_text COLUMN_SCALAR LongText end process(:column_create, request) assert_equal(<<-EXPECTED, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books title #{data[:flags]} ShortText EXPECTED end @@ -128,7 +128,7 @@ column_create Books title #{data[:flags]} ShortText } process(:column_create, request) assert_equal(<<-EXPECTED, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books title COLUMN_SCALAR ShortText column_create Books entry_title #{data[:flags]} Books title @@ -160,7 +160,7 @@ column_create Books entry_title #{data[:flags]} Books title } process(:column_create, request) assert_equal(<<-EXPECTED, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books title COLUMN_SCALAR ShortText column_create Books entry_title #{flags} Books title Modified: test/unit/plugins/groonga/test_column_remove.rb (+2 -2) =================================================================== --- test/unit/plugins/groonga/test_column_remove.rb 2014-05-19 15:11:45 +0900 (9e8360d) +++ test/unit/plugins/groonga/test_column_remove.rb 2014-05-19 15:32:12 +0900 (f389881) @@ -77,7 +77,7 @@ class ColumnRemoveTest < GroongaHandlerTest process(:column_remove, {"table" => "Books", "name" => "title"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText SCHEMA end @@ -92,7 +92,7 @@ table_create Books TABLE_HASH_KEY --key_type ShortText process(:column_remove, {"table" => "Books", "name" => "title"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText SCHEMA end end Modified: test/unit/plugins/groonga/test_column_rename.rb (+2 -2) =================================================================== --- test/unit/plugins/groonga/test_column_rename.rb 2014-05-19 15:11:45 +0900 (e01cfb0) +++ test/unit/plugins/groonga/test_column_rename.rb 2014-05-19 15:32:12 +0900 (b06fbae) @@ -80,7 +80,7 @@ class ColumnRenameTest < GroongaHandlerTest process(:column_rename, {"table" => "Books", "name" => "title", "new_name" => "label"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books label COLUMN_SCALAR ShortText SCHEMA end @@ -96,7 +96,7 @@ column_create Books label COLUMN_SCALAR ShortText process(:column_rename, {"table" => "Books", "name" => "title", "new_name" => "label"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText column_create Books label COLUMN_SCALAR ShortText column_create Books entry_title COLUMN_INDEX Books label Modified: test/unit/plugins/groonga/test_delete.rb (+2 -2) =================================================================== --- test/unit/plugins/groonga/test_delete.rb 2014-05-19 15:11:45 +0900 (2997ed7) +++ test/unit/plugins/groonga/test_delete.rb 2014-05-19 15:32:12 +0900 (2bfa558) @@ -88,7 +88,7 @@ class DeleteTest < GroongaHandlerTest process(:delete, {"table" => "Books", "key" => "sample"}) assert_equal(<<-DUMP, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText DUMP end @@ -114,7 +114,7 @@ table_create Ages TABLE_NO_KEY process(:delete, {"table" => "Books", "filter" => '_key @^ "D"'}) assert_equal(<<-DUMP, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText load --table Books [ Modified: test/unit/plugins/groonga/test_table_create.rb (+9 -9) =================================================================== --- test/unit/plugins/groonga/test_table_create.rb 2014-05-19 15:11:45 +0900 (5bd1888) +++ test/unit/plugins/groonga/test_table_create.rb 2014-05-19 15:32:12 +0900 (12f39ae) @@ -40,7 +40,7 @@ class TableCreateTest < GroongaHandlerTest def test_name process(:table_create, {"name" => "Books"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText SCHEMA end @@ -55,25 +55,25 @@ table_create Books TABLE_NO_KEY "TABLE_HASH_KEY" => { :flags => "TABLE_HASH_KEY", :schema => <<-SCHEMA, -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText SCHEMA }, "TABLE_PAT_KEY" => { :flags => "TABLE_PAT_KEY", :schema => <<-SCHEMA, -table_create Books TABLE_PAT_KEY --key_type ShortText +table_create Books TABLE_PAT_KEY ShortText SCHEMA }, "TABLE_DAT_KEY" => { :flags => "TABLE_DAT_KEY", :schema => <<-SCHEMA, -table_create Books TABLE_DAT_KEY --key_type ShortText +table_create Books TABLE_DAT_KEY ShortText SCHEMA }, "KEY_WITH_SIS with TABLE_PAT_KEY" => { :flags => "KEY_WITH_SIS|TABLE_PAT_KEY", :schema => <<-SCHEMA, -table_create Books TABLE_PAT_KEY|KEY_WITH_SIS --key_type ShortText +table_create Books TABLE_PAT_KEY|KEY_WITH_SIS ShortText SCHEMA }, "KEY_WITH_SIS without TABLE_PAT_KEY" => { @@ -101,7 +101,7 @@ table_create Books TABLE_NO_KEY } process(:table_create, request) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type Int32 +table_create Books TABLE_HASH_KEY Int32 SCHEMA end end @@ -114,7 +114,7 @@ table_create Books TABLE_HASH_KEY --key_type Int32 } process(:table_create, request) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText --value_type Int32 +table_create Books TABLE_HASH_KEY ShortText --value_type Int32 SCHEMA end end @@ -127,7 +127,7 @@ table_create Books TABLE_HASH_KEY --key_type ShortText --value_type Int32 } process(:table_create, request) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText --default_tokenizer TokenBigram +table_create Books TABLE_HASH_KEY ShortText --default_tokenizer TokenBigram SCHEMA end end @@ -140,7 +140,7 @@ table_create Books TABLE_HASH_KEY --key_type ShortText --default_tokenizer Token } process(:table_create, request) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText --normalizer NormalizerAuto +table_create Books TABLE_HASH_KEY ShortText --normalizer NormalizerAuto SCHEMA end end Modified: test/unit/plugins/groonga/test_table_remove.rb (+1 -1) =================================================================== --- test/unit/plugins/groonga/test_table_remove.rb 2014-05-19 15:11:45 +0900 (a7b6a7b) +++ test/unit/plugins/groonga/test_table_remove.rb 2014-05-19 15:32:12 +0900 (6a11653) @@ -55,7 +55,7 @@ class TableRemoveTest < GroongaHandlerTest def test_unknown_table process(:table_remove, {"name" => "Unknown"}) assert_equal(<<-SCHEMA, dump) -table_create Books TABLE_HASH_KEY --key_type ShortText +table_create Books TABLE_HASH_KEY ShortText SCHEMA end end Modified: test/unit/test_schema_applier.rb (+2 -2) =================================================================== --- test/unit/test_schema_applier.rb 2014-05-19 15:11:45 +0900 (13f91c0) +++ test/unit/test_schema_applier.rb 2014-05-19 15:32:12 +0900 (eb76d63) @@ -51,9 +51,9 @@ class SchemaCreatorTest < Test::Unit::TestCase } apply(schema_data) assert_equal(<<-DUMP, dump) -table_create Names TABLE_HASH_KEY --key_type ShortText +table_create Names TABLE_HASH_KEY ShortText -table_create Users TABLE_HASH_KEY --key_type Names +table_create Users TABLE_HASH_KEY Names DUMP end end Modified: test/unit/test_watch_schema.rb (+4 -4) =================================================================== --- test/unit/test_watch_schema.rb 2014-05-19 15:11:45 +0900 (6a8ea0f) +++ test/unit/test_watch_schema.rb 2014-05-19 15:32:12 +0900 (9f7c65a) @@ -35,13 +35,13 @@ class WatchSchemaTest < Test::Unit::TestCase :database => database) end assert_equal(<<-SCHEMA, dumped_commands) -table_create Keyword TABLE_PAT_KEY --key_type ShortText --normalizer NormalizerAuto +table_create Keyword TABLE_PAT_KEY ShortText --normalizer NormalizerAuto -table_create Query TABLE_HASH_KEY --key_type ShortText +table_create Query TABLE_HASH_KEY ShortText -table_create Route TABLE_HASH_KEY --key_type ShortText +table_create Route TABLE_HASH_KEY ShortText -table_create Subscriber TABLE_HASH_KEY --key_type ShortText +table_create Subscriber TABLE_HASH_KEY ShortText column_create Subscriber last_modified COLUMN_SCALAR Time column_create Query keywords COLUMN_VECTOR Keyword -------------- next part -------------- HTML����������������������������... Download