Skip to content

Commit

Permalink
Merge pull request #2352 from MitrahSoft/LDEV_4827_
Browse files Browse the repository at this point in the history
improve test cases
  • Loading branch information
zspitzer authored Apr 22, 2024
2 parents 2c0ae8e + bd4645f commit 1e35382
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/tickets/LDEV4827.cfc
Original file line number Diff line number Diff line change
@@ -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',
Expand Down Expand Up @@ -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 = {};
Expand Down

0 comments on commit 1e35382

Please sign in to comment.