Fix QueryAdapter and SlidingWithBorderTest, remove --strict
QueryAdapter and SlidingWithBorder used the statusdat backend and must therefore be modified. The --strict parameter stores controller tests because of the 1s timeout and offers now advantages for us at this time. refs #4417
This commit is contained in:
parent
5827cb37cb
commit
76a3ef86c1
|
@ -2,29 +2,30 @@
|
|||
|
||||
namespace Tests\Icinga\Web\Paginator\Adapter;
|
||||
|
||||
use Icinga\Backend\Statusdat;
|
||||
use Monitoring\Backend\Statusdat;
|
||||
use Icinga\Protocol\Statusdat\Reader;
|
||||
use Icinga\Web\Paginator\Adapter\QueryAdapter;
|
||||
use Tests\Icinga\Protocol\Statusdat\StatusdatTestLoader;
|
||||
|
||||
require_once 'Zend/Paginator/Adapter/Interface.php';
|
||||
require_once 'Zend/Config.php';
|
||||
require_once 'Zend/Cache.php';
|
||||
|
||||
require_once '../../library/Icinga/Web/Paginator/Adapter/QueryAdapter.php';
|
||||
require_once '../../library/Icinga/Backend/Criteria/Order.php';
|
||||
require_once '../../library/Icinga/Backend/AbstractBackend.php';
|
||||
require_once '../../library/Icinga/Backend/Query.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat/Query.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat.php';
|
||||
require_once '../../library/Icinga/Backend/MonitoringObjectList.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat/HostlistQuery.php';
|
||||
require_once '../../library/Icinga/Backend/DataView/AbstractAccessorStrategy.php';
|
||||
require_once '../../library/Icinga/Backend/DataView/ObjectRemappingView.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat/DataView/StatusdatHostView.php';
|
||||
|
||||
require_once 'library/Icinga/Protocol/Statusdat/StatusdatTestLoader.php';
|
||||
StatusdatTestLoader::requireLibrary();
|
||||
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/Criteria/Order.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/AbstractBackend.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/Query/Query.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/Query/StatusQuery.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/DataView/StatusdatHostView.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/View/MonitoringView.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/View/StatusView.php';
|
||||
|
||||
require_once '../../library/Icinga/Protocol/AbstractQuery.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/IReader.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/Reader.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/Query.php';
|
||||
|
||||
|
||||
|
||||
class QueryAdapterTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
@ -54,7 +55,7 @@ class QueryAdapterTest extends \PHPUnit_Framework_TestCase
|
|||
public function testLimit1()
|
||||
{
|
||||
$backend = new Statusdat($this->config);
|
||||
$query = $backend->select()->from('hostlist');
|
||||
$query = $backend->select()->from('status');
|
||||
|
||||
$adapter = new QueryAdapter($query);
|
||||
|
||||
|
@ -71,7 +72,7 @@ class QueryAdapterTest extends \PHPUnit_Framework_TestCase
|
|||
public function testLimit2()
|
||||
{
|
||||
$backend = new Statusdat($this->config);
|
||||
$query = $backend->select()->from('hostlist');
|
||||
$query = $backend->select()->from('status');
|
||||
|
||||
$adapter = new QueryAdapter($query);
|
||||
$this->assertEquals(30, $adapter->count());
|
||||
|
|
|
@ -2,9 +2,11 @@
|
|||
|
||||
namespace Tests\Icinga\Web\Paginator\ScrollingStyle;
|
||||
|
||||
use Icinga\Backend\Statusdat;
|
||||
use Monitoring\Backend\Statusdat;
|
||||
use Icinga\Protocol\Statusdat\Reader;
|
||||
use Icinga\Web\Paginator\Adapter\QueryAdapter;
|
||||
use Tests\Icinga\Protocol\Statusdat\StatusdatTestLoader;
|
||||
|
||||
|
||||
require_once 'Zend/Paginator/Adapter/Interface.php';
|
||||
require_once 'Zend/Paginator/ScrollingStyle/Interface.php';
|
||||
|
@ -13,23 +15,18 @@ require_once 'Zend/Config.php';
|
|||
require_once 'Zend/Cache.php';
|
||||
|
||||
require_once '../../library/Icinga/Web/Paginator/Adapter/QueryAdapter.php';
|
||||
require_once '../../library/Icinga/Backend/Criteria/Order.php';
|
||||
require_once '../../library/Icinga/Backend/AbstractBackend.php';
|
||||
require_once '../../library/Icinga/Backend/Query.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat/Query.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat.php';
|
||||
require_once '../../library/Icinga/Backend/MonitoringObjectList.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat/HostlistQuery.php';
|
||||
require_once '../../library/Icinga/Backend/DataView/AbstractAccessorStrategy.php';
|
||||
require_once '../../library/Icinga/Backend/DataView/ObjectRemappingView.php';
|
||||
require_once '../../library/Icinga/Backend/Statusdat/DataView/StatusdatHostView.php';
|
||||
require_once '../../library/Icinga/Protocol/AbstractQuery.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/IReader.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/Reader.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/Query.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/Parser.php';
|
||||
require_once '../../library/Icinga/Protocol/Statusdat/RuntimeStateContainer.php';
|
||||
require_once 'library/Icinga/Protocol/Statusdat/StatusdatTestLoader.php';
|
||||
|
||||
StatusdatTestLoader::requireLibrary();
|
||||
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/Criteria/Order.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/AbstractBackend.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/Query/Query.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/Query/StatusQuery.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/Backend/Statusdat/DataView/StatusdatHostView.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/View/MonitoringView.php';
|
||||
require_once '../../modules/monitoring/library/Monitoring/View/StatusView.php';
|
||||
require_once '../../library/Icinga/Web/Paginator/ScrollingStyle/SlidingWithBorder.php';
|
||||
|
||||
class TestPaginatorAdapter implements \Zend_Paginator_Adapter_Interface
|
||||
|
@ -109,7 +106,7 @@ class SlidingwithborderTest extends \PHPUnit_Framework_TestCase
|
|||
public function testGetPages1()
|
||||
{
|
||||
$backend = new Statusdat($this->config);
|
||||
$query = $backend->select()->from('hostlist');
|
||||
$query = $backend->select()->from('status');
|
||||
|
||||
$adapter = new QueryAdapter($query);
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ from optparse import OptionParser, BadOptionError, AmbiguousOptionError
|
|||
|
||||
|
||||
APPLICATION = 'phpunit'
|
||||
DEFAULT_ARGS = ['--strict', '--static-backup']
|
||||
DEFAULT_ARGS = ['--static-backup']
|
||||
|
||||
VAGRANT_SCRIPT = '/vagrant/test/php/runtests'
|
||||
REPORT_DIRECTORY = '../../build/log'
|
||||
|
|
Loading…
Reference in New Issue