N°4052 - OQL parser limit for huge request - fix CI

This commit is contained in:
Eric
2021-06-03 17:07:17 +02:00
parent 3965806fa0
commit d11eceac62
2 changed files with 9 additions and 9 deletions

View File

@@ -617,7 +617,7 @@ class DBSearchTest extends ItopDataTestCase
$sExceptionClass = get_class($e);
}
static::assertEquals('OQLParserException', $sExceptionClass);
static::assertEquals('OQLParserSyntaxErrorException', $sExceptionClass);
}
public function testSanity_GroupFunction_In_GroupByPart()
@@ -633,7 +633,7 @@ class DBSearchTest extends ItopDataTestCase
$sExceptionClass = get_class($e);
}
static::assertEquals('OQLParserException', $sExceptionClass);
static::assertEquals('OQLParserSyntaxErrorException', $sExceptionClass);
}
public function testSanity_UnknownGroupFunction_In_SelectPart()

View File

@@ -203,16 +203,16 @@ class OQLTest extends ItopDataTestCase
public function BadQueryProvider()
{
return array(
array('SELECT toto WHERE toto.a = (3++1)', 'OQLParserException'),
array('SELECT toto WHHHERE toto.a = "1"', 'OQLParserException'),
array('SELECT toto WHERE toto.a == "1"', 'OQLParserException'),
array('SELECT toto WHERE toto.a = (3++1)', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHHHERE toto.a = "1"', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a == "1"', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a % 1', 'Exception'),
array('SELECT toto WHERE toto.a like \'arg\'', 'OQLParserException'),
array('SELECT toto WHERE toto.a NOT LIKE "That\'s "it""', 'OQLParserException'),
array('SELECT toto WHERE toto.a NOT LIKE \'That\'s it\'', 'OQLParserException'),
array('SELECT toto WHERE toto.a like \'arg\'', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a NOT LIKE "That\'s "it""', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a NOT LIKE \'That\'s it\'', 'OQLParserSyntaxErrorException'),
array('SELECT toto WHERE toto.a NOT LIKE "blah \\ truc"', 'Exception'),
array('SELECT toto WHERE toto.a NOT LIKE \'blah \\ truc\'', 'Exception'),
array('SELECT A JOIN B ON A.myB = B.id JOIN C ON C.parent_id = B.id WHERE A.col1 BELOW 2 AND B.id = 3', 'OQLParserException'),
array('SELECT A JOIN B ON A.myB = B.id JOIN C ON C.parent_id = B.id WHERE A.col1 BELOW 2 AND B.id = 3', 'OQLParserSyntaxErrorException'),
);
}