[Groonga-commit] groonga/groonga at 8fba660 [master] object_remove test: add a test case for failing object_remove

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Feb 10 15:02:50 JST 2016


Kouhei Sutou	2016-02-10 15:02:50 +0900 (Wed, 10 Feb 2016)

  New Revision: 8fba6607a74630f28636d2a386db9155707cfe5d
  https://github.com/groonga/groonga/commit/8fba6607a74630f28636d2a386db9155707cfe5d

  Message:
    object_remove test: add a test case for failing object_remove
    
    It's a type is wrong case.

  Added files:
    test/command/fixture/object_remove/wrong_type
    test/command/suite/object_remove/broken/too_small_force.expected
    test/command/suite/object_remove/broken/too_small_force.test
    test/command/suite/object_remove/broken/wrong_type.expected
    test/command/suite/object_remove/broken/wrong_type.test
    test/command/suite/object_remove/broken/wrong_type_force.expected
    test/command/suite/object_remove/broken/wrong_type_force.test

  Added: test/command/fixture/object_remove/wrong_type (+0 -0) 100644
===================================================================
(Binary files differ)

  Added: test/command/suite/object_remove/broken/too_small_force.expected (+19 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/too_small_force.expected    2016-02-10 15:02:50 +0900 (8552dcd)
@@ -0,0 +1,19 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+database_unmap
+[[0,0.0,0.0],true]
+object_remove Users --force yes
+[
+  [
+    [
+      -65,
+      0.0,
+      0.0
+    ],
+    "[io][open] file size is too small: <8>(required: >= 64): <db/db.0000100>"
+  ],
+  false
+]
+#|e| [io][open] file size is too small: <8>(required: >= 64): <db/db.0000100>
+object_exist Users
+[[0,0.0,0.0],false]

  Added: test/command/suite/object_remove/broken/too_small_force.test (+10 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/too_small_force.test    2016-02-10 15:02:50 +0900 (aec8111)
@@ -0,0 +1,10 @@
+table_create Users TABLE_HASH_KEY ShortText
+
+#@disable-logging
+thread_limit 1
+#@enable-logging
+database_unmap
+#@copy-path fixture/object_remove/too_small #{db_path}.0000100
+
+object_remove Users --force yes
+object_exist Users

  Added: test/command/suite/object_remove/broken/wrong_type.expected (+20 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/wrong_type.expected    2016-02-10 15:02:50 +0900 (76e5173)
@@ -0,0 +1,20 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+database_unmap
+[[0,0.0,0.0],true]
+object_remove Users
+[
+  [
+    [
+      -22,
+      0.0,
+      0.0
+    ],
+    "[object][remove] failed to open the target object: <Users>"
+  ],
+  false
+]
+#|e| [table][hash] file type must be 0x30: <0000>
+#|e| [object][remove] failed to open the target object: <Users>
+object_exist Users
+[[0,0.0,0.0],true]

  Added: test/command/suite/object_remove/broken/wrong_type.test (+10 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/wrong_type.test    2016-02-10 15:02:50 +0900 (8466e20)
@@ -0,0 +1,10 @@
+table_create Users TABLE_HASH_KEY ShortText
+
+#@disable-logging
+thread_limit 1
+#@enable-logging
+database_unmap
+#@copy-path fixture/object_remove/wrong_type #{db_path}.0000100
+
+object_remove Users
+object_exist Users

  Added: test/command/suite/object_remove/broken/wrong_type_force.expected (+9 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/wrong_type_force.expected    2016-02-10 15:02:50 +0900 (0487091)
@@ -0,0 +1,9 @@
+table_create Users TABLE_HASH_KEY ShortText
+[[0,0.0,0.0],true]
+database_unmap
+[[0,0.0,0.0],true]
+object_remove Users --force yes
+[[[-54,0.0,0.0],"[table][hash] file type must be 0x30: <0000>"],false]
+#|e| [table][hash] file type must be 0x30: <0000>
+object_exist Users
+[[0,0.0,0.0],false]

  Added: test/command/suite/object_remove/broken/wrong_type_force.test (+10 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/object_remove/broken/wrong_type_force.test    2016-02-10 15:02:50 +0900 (283255e)
@@ -0,0 +1,10 @@
+table_create Users TABLE_HASH_KEY ShortText
+
+#@disable-logging
+thread_limit 1
+#@enable-logging
+database_unmap
+#@copy-path fixture/object_remove/wrong_type #{db_path}.0000100
+
+object_remove Users --force yes
+object_exist Users
-------------- next part --------------
HTML����������������������������...
다운로드 



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