From bd4645fbab4cbcd80ac5a91e5fd2b123e3df877e Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Mon, 22 Apr 2024 15:29:26 +0530 Subject: [PATCH] improve test cases --- test/tickets/LDEV4827.cfc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/tickets/LDEV4827.cfc b/test/tickets/LDEV4827.cfc index 3a19649c1d..f458549e4c 100644 --- a/test/tickets/LDEV4827.cfc +++ b/test/tickets/LDEV4827.cfc @@ -1,12 +1,12 @@ component extends="org.lucee.cfml.test.LuceeTestCase" { function beforeAll() { - variables.mssql= getCredentials(); + variables.mssql = getCredentials(); } function run( testResults , testBox ) { describe( "Test suite for LDEV-4827", function() { - it( title='Checking Query with real result on mssql',body = function( currentSpec ) { + it( title='Checking Query with real result on mssql', skip=checkMySqlEnvVarsAvailable(), body=function( currentSpec ) { adm = new Administrator('server', request.SERVERADMINPASSWORD?:server.SERVERADMINPASSWORD); adm.updateDatasource( name: 'datasource4827', @@ -36,6 +36,10 @@ component extends="org.lucee.cfml.test.LuceeTestCase" { }); } + private boolean function checkMySqlEnvVarsAvailable() { + return (StructCount(server.getDatasource("mssql")) eq 0); + } + private struct function getCredentials() { // getting the credentials from the environment variables var mssql = {};