Skip to content

Commit 9b8d28e

Browse files
authored
fix missing skip test when no DB is available (go-sql-driver#1594)
Fix `go test` fails when no DB is set up.
1 parent 05325d8 commit 9b8d28e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

driver_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -3539,6 +3539,9 @@ func TestConnectionAttributes(t *testing.T) {
35393539
}
35403540

35413541
func TestErrorInMultiResult(t *testing.T) {
3542+
if !available {
3543+
t.Skipf("MySQL server not running on %s", netAddr)
3544+
}
35423545
// https://github.com/go-sql-driver/mysql/issues/1361
35433546
var db *sql.DB
35443547
if _, err := ParseDSN(dsn); err != errInvalidDSNUnsafeCollation {

0 commit comments

Comments
 (0)