Skip to content

Commit db5374a

Browse files
committed
build: update tests with hasOrm skips
1 parent e40b3de commit db5374a

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

test/tickets/LDEV3430.cfc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,42 @@ component extends="org.lucee.cfml.test.LuceeTestCase"{
44
}
55
function run( testResults, testBox ) {
66
describe("Testcase for LDEV-3430", function() {
7-
it( title="ORMExecuteQuery() with positional argument(hql)", body=function( currentSpec ){
7+
it( title="ORMExecuteQuery() with positional argument(hql)", skip=noOrm(), body=function( currentSpec ){
88
local.result = _InternalRequest(
99
template : "#uri#\test.cfm",
1010
forms : { Scene = 1 }
1111
);
1212
expect(trim(result.filecontent)).toBeTrue();
1313
});
14-
it( title="ORMExecuteQuery() with positional arguments(hql, params, unique, queryOptions)", body=function( currentSpec ){
14+
it( title="ORMExecuteQuery() with positional arguments(hql, params, unique, queryOptions)", skip=noOrm(), body=function( currentSpec ){
1515
local.result = _InternalRequest(
1616
template : "#uri#\test.cfm",
1717
forms : { Scene = 2 }
1818
);
1919
expect(trim(result.filecontent)).toBeTrue();
2020
});
21-
it( title="ORMExecuteQuery() with named arguments(hql, params, unique, queryOptions)", body=function( currentSpec ){
21+
it( title="ORMExecuteQuery() with named arguments(hql, params, unique, queryOptions)", skip=noOrm(), body=function( currentSpec ){
2222
local.result = _InternalRequest(
2323
template : "#uri#\test.cfm",
2424
forms : { Scene = 3 }
2525
);
2626
expect(trim(result.filecontent)).toBeTrue();
2727
});
28-
it( title="ORMExecuteQuery() with named argument(hql)", body=function( currentSpec ){
28+
it( title="ORMExecuteQuery() with named argument(hql)", skip=noOrm(), body=function( currentSpec ){
2929
local.result = _InternalRequest(
3030
template : "#uri#\test.cfm",
3131
forms : { Scene = 4 }
3232
);
3333
expect(trim(result.filecontent)).toBeTrue();
3434
});
35-
it( title="ORMExecuteQuery() with named arguments(hql, params)", body=function( currentSpec ){
35+
it( title="ORMExecuteQuery() with named arguments(hql, params)", skip=noOrm(), body=function( currentSpec ){
3636
local.result = _InternalRequest(
3737
template : "#uri#\test.cfm",
3838
forms : { Scene = 5 }
3939
);
4040
expect(trim(result.filecontent)).toBeTrue();
4141
});
42-
it( title="ORMExecuteQuery() with named arguments(hql, params, unique)", body=function( currentSpec ){
42+
it( title="ORMExecuteQuery() with named arguments(hql, params, unique)", skip=noOrm(), body=function( currentSpec ){
4343
local.result = _InternalRequest(
4444
template : "#uri#\test.cfm",
4545
forms : { Scene = 6 }
@@ -48,6 +48,10 @@ component extends="org.lucee.cfml.test.LuceeTestCase"{
4848
});
4949
});
5050
}
51+
private function noOrm() {
52+
return ( structCount( server.getTestService("orm") ) eq 0 );
53+
}
54+
5155
private string function createURI(string calledName){
5256
var baseURI = "/test/#listLast(getDirectoryFromPath(getCurrenttemplatepath()),"\/")#/";
5357
return baseURI&""&calledName;

test/tickets/LDEV3860.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="sas" {
8383
}
8484

8585
private boolean function isDatasourceNotConfigured(){
86-
return !structCount(server.getDatasource("mssql"));
86+
return !structCount(server.getDatasource("mssql")) || !structCount( server.getTestService("orm") );
8787
}
8888

8989
private string function createURI(string calledName) {

test/tickets/LDEV5459.cfc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
44

55
describe( title='LDEV-5459' , body=function(){
66

7-
// this test case can be removed in case the class get missing in the future
8-
it( title='missing object', body=function() {
7+
// this test case can be removed in case the class get missing in the future
8+
it( title='missing object', skip=noOrm(), body=function() {
99
var type = "org.hibernate.criterion.Restrictions";// must be a class with no empty constructor
1010
var obj = createObject( "java", type );
1111
expect( obj.getClass().getName() ).toBe( type );
@@ -101,5 +101,8 @@ component extends="org.lucee.cfml.test.LuceeTestCase" {
101101

102102
}
103103

104+
private function noOrm() {
105+
return ( structCount( server.getTestService( "orm" ) ) eq 0 );
106+
}
104107

105108
}

test/tickets/LDEV6003.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="orm" {
3636
}
3737

3838
private function notHasMssql() {
39-
return structCount( server.getDatasource( "mssql" ) ) == 0;
39+
return structCount( server.getDatasource( "mssql" ) ) == 0 || structCount( server.getTestService( "orm" ) ) == 0;
4040
}
4141

4242
private string function createURI( string calledName ) {

0 commit comments

Comments
 (0)