(t *testing.T)
| 429 | } |
| 430 | |
| 431 | func TestAuthFastNativePasswordNotAllowed(t *testing.T) { |
| 432 | _, mc := newRWMockConn(1) |
| 433 | mc.cfg.User = "root" |
| 434 | mc.cfg.Passwd = "secret" |
| 435 | mc.cfg.AllowNativePasswords = false |
| 436 | |
| 437 | authData := []byte{70, 114, 92, 94, 1, 38, 11, 116, 63, 114, 23, 101, 126, |
| 438 | 103, 26, 95, 81, 17, 24, 21} |
| 439 | plugin := "mysql_native_password" |
| 440 | |
| 441 | // Send Client Authentication Packet |
| 442 | _, err := mc.auth(authData, plugin) |
| 443 | if err != ErrNativePassword { |
| 444 | t.Errorf("expected ErrNativePassword, got %v", err) |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | func TestAuthFastNativePassword(t *testing.T) { |
| 449 | conn, mc := newRWMockConn(1) |
nothing calls this directly
no test coverage detected