File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -133,3 +133,7 @@ module.exports.getHostSuffix = function getHostSuffix() {
133133 }
134134 return "@'%'" ;
135135} ;
136+
137+ module . exports . isLocalDb = function isLocalDb ( ) {
138+ return process . env . LOCAL_DB === 'local' || localEnv === undefined ;
139+ } ;
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const Conf = require('../conf');
99const fs = require ( 'fs' ) ;
1010const os = require ( 'os' ) ;
1111const path = require ( 'path' ) ;
12- const { isMaxscale, getHostSuffix } = require ( '../base' ) ;
12+ const { isMaxscale, getHostSuffix, isLocalDb } = require ( '../base' ) ;
1313
1414describe ( 'authentication plugin' , ( ) => {
1515 let rsaPublicKey = process . env . TEST_RSA_PUBLIC_KEY ;
@@ -195,6 +195,8 @@ describe('authentication plugin', () => {
195195 if ( process . platform === 'win32' ) return this . skip ( ) ;
196196 if ( ! shareConn . info . isMariaDB ( ) || ! shareConn . info . hasMinVersion ( 10 , 1 , 11 ) ) return this . skip ( ) ;
197197 if ( ! process . env . LOCAL_SOCKET_AVAILABLE ) return this . skip ( ) ;
198+ if ( ! isLocalDb ( ) ) return this . skip ( ) ;
199+
198200 if ( Conf . baseConfig . host !== 'localhost' && Conf . baseConfig . host !== 'mariadb.example.com' ) return this . skip ( ) ;
199201
200202 shareConn
Original file line number Diff line number Diff line change 66const base = require ( '../base.js' ) ;
77const { assert } = require ( 'chai' ) ;
88const Conf = require ( '../conf' ) ;
9- const { isMaxscale } = require ( '../base' ) ;
9+ const { isMaxscale, isLocalDb } = require ( '../base' ) ;
1010
1111describe ( 'test socket' , ( ) => {
1212 it ( 'named pipe' , function ( done ) {
@@ -80,6 +80,7 @@ describe('test socket', () => {
8080 ! ( Conf . baseConfig . host === 'localhost' || Conf . baseConfig . host === 'mariadb.example.com' )
8181 )
8282 return this . skip ( ) ;
83+ if ( ! isLocalDb ( ) ) return this . skip ( ) ;
8384
8485 shareConn
8586 . query ( 'select @@version_compile_os,@@socket soc' )
You can’t perform that action at this time.
0 commit comments