File tree 4 files changed +15
-13
lines changed
test/integration/connection
4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,15 @@ node_js:
3
3
- ' 0.6'
4
4
- ' 0.8'
5
5
- ' 0.10'
6
+
7
+ before_script :
8
+ - " mysql -e 'create database node_mysql;'"
9
+
10
+ env :
11
+ - MYSQL_DATABASE=node_mysql
12
+
13
+ mysql :
14
+ adapter : mysql2
15
+ username : root
16
+ encoding : utf8
17
+ database : node_mysql
Original file line number Diff line number Diff line change @@ -2,10 +2,6 @@ var common = require('../../common');
2
2
var connection = common . createConnection ( ) ;
3
3
var assert = require ( 'assert' ) ;
4
4
5
- if ( common . isTravis ( ) ) {
6
- return console . log ( 'skipping - travis mysql does not support this test' ) ;
7
- }
8
-
9
5
connection . query ( 'CREATE DATABASE ' + common . testDatabase , function ( err ) {
10
6
if ( err && err . code !== 'ER_DB_CREATE_EXISTS' ) throw err ;
11
7
Original file line number Diff line number Diff line change @@ -7,18 +7,16 @@ var common = require('../../common');
7
7
var connection = common . createConnection ( ) ;
8
8
var assert = require ( 'assert' ) ;
9
9
10
- if ( common . isTravis ( ) ) {
11
- return console . log ( 'skipping - travis mysql does not support this test' ) ;
12
- }
13
10
14
11
var err ;
15
- connection . changeUser ( { user : 'does-not-exist' } , function ( _err ) {
12
+ // XXX: user: 'does-not-exist' doesn't cause any error...
13
+ connection . changeUser ( { database : 'does-not-exist' } , function ( _err ) {
16
14
err = _err ;
17
15
connection . end ( ) ;
18
16
} ) ;
19
17
20
18
process . on ( 'exit' , function ( ) {
21
19
if ( process . env . NO_GRANT == '1' && err === null ) return ;
22
- assert . equal ( err . code , 'ER_ACCESS_DENIED_ERROR ' ) ;
20
+ assert . equal ( err . code , 'ER_BAD_DB_ERROR ' ) ;
23
21
assert . equal ( err . fatal , true ) ;
24
22
} ) ;
Original file line number Diff line number Diff line change @@ -2,10 +2,6 @@ var common = require('../../common');
2
2
var connection = common . createConnection ( ) ;
3
3
var assert = require ( 'assert' ) ;
4
4
5
- if ( common . isTravis ( ) ) {
6
- return console . log ( 'skipping - travis mysql does not support this test' ) ;
7
- }
8
-
9
5
connection . query ( 'CREATE DATABASE ' + common . testDatabase , function ( err ) {
10
6
if ( err && err . code !== 'ER_DB_CREATE_EXISTS' ) throw err ;
11
7
} ) ;
You can’t perform that action at this time.
0 commit comments