[Groonga-commit] groonga/grnci at 94864b0 [master] Use DB.OBjectExist to check the result of removes.

Back to archive index

Susumu Yata null+****@clear*****
Thu Sep 14 14:22:29 JST 2017


Susumu Yata	2017-09-14 14:22:29 +0900 (Thu, 14 Sep 2017)

  New Revision: 94864b09bfc50f50318c6430b0415771b4a58565
  https://github.com/groonga/grnci/commit/94864b09bfc50f50318c6430b0415771b4a58565

  Message:
    Use DB.OBjectExist to check the result of removes.
    
    Ref: #39

  Modified files:
    v2/libgrn/db_test.go

  Modified: v2/libgrn/db_test.go (+6 -0)
===================================================================
--- v2/libgrn/db_test.go    2017-09-14 14:21:37 +0900 (b71135e)
+++ v2/libgrn/db_test.go    2017-09-14 14:22:29 +0900 (8aaacc4)
@@ -138,6 +138,9 @@ column_create Tbl col COLUMN_SCALAR ShortText`
 	if err := db.ColumnRemove("Tbl.col"); err != nil {
 		t.Fatalf("db.ColumnRemove failed: %v", err)
 	}
+	if ok, _ := db.ObjectExist("Tbl.col"); ok {
+		t.Fatalf("db.ObjectExist wrongly succeeded")
+	}
 }
 
 func TestDBColumnRemoveInvalidTable(t *testing.T) {
@@ -1061,6 +1064,9 @@ func TestDBTableRemove(t *testing.T) {
 	if err := db.TableRemove("Tbl", false); err != nil {
 		t.Fatalf("db.TableRemove failed: %v", err)
 	}
+	if ok, _ := db.ObjectExist("Tbl"); ok {
+		t.Fatalf("db.ObjectExist wrongly succeeded")
+	}
 }
 
 func TestDBTableRemoveInvalidName(t *testing.T) {
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20170914/4dd318c4/attachment-0001.htm 



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