Explorar o código

don't fail on strict hosts

Arne Hormann %!s(int64=12) %!d(string=hai) anos
pai
achega
4e994df5ec
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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