瀏覽代碼

don't fail on strict hosts

Arne Hormann 12 年之前
父節點
當前提交
4e994df5ec
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      driver_test.go

+ 4 - 0
driver_test.go

@@ -741,6 +741,9 @@ func TestLoadData(t *testing.T) {
 }
 
 func TestStrict(t *testing.T) {
+	oldDsn := dsn
+	// to get rid of stricter modes - we want to test for warnings, not errors
+	dsn += "&sql_mode=ALLOW_INVALID_DATES"
 	runTests(t, "TestStrict", func(dbt *DBTest) {
 		dbt.mustExec("CREATE TABLE test (a TINYINT NOT NULL, b CHAR(4))")
 
@@ -803,6 +806,7 @@ func TestStrict(t *testing.T) {
 			}
 		}
 	})
+	dsn = oldDsn
 }
 
 // Special cases