Move utility and mock classes to .../filter/test

The utility and mock classes created for the testing of dbfwfilter
will be used for testing certain aspects of the cache filter.
Consequently better to move them somewhere outside dbfwfilter.
Sofar they will be built separately for each filter.
This commit is contained in:
Johan Wikman
2017-11-20 16:37:37 +02:00
parent 70bf901102
commit c38fbd0b74
20 changed files with 23 additions and 20 deletions

View File

@ -1,15 +1,18 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../test)
add_executable(test_dbfwfilter
test_dbfwfilter.cc
filtermodule.cc
mock.cc
mock_backend.cc
mock_client.cc
mock_dcb.cc
mock_routersession.cc
mock_session.cc
module.cc
tempfile.cc
../../test/filtermodule.cc
../../test/mock.cc
../../test/mock_backend.cc
../../test/mock_client.cc
../../test/mock_dcb.cc
../../test/mock_routersession.cc
../../test/mock_session.cc
../../test/module.cc
../../test/queryclassifiermodule.cc
)
target_link_libraries(test_dbfwfilter maxscale-common)

View File

@ -15,12 +15,12 @@
#include <memory>
#include <iostream>
#include <maxscale/log_manager.h>
#include "maxscale/filtermodule.hh"
#include "maxscale/queryclassifiermodule.hh"
#include "maxscale/mock/backend.hh"
#include "maxscale/mock/routersession.hh"
#include "maxscale/mock/session.hh"
#include "maxscale/mock/client.hh"
#include <maxscale/filtermodule.hh>
#include <maxscale/queryclassifiermodule.hh>
#include <maxscale/mock/backend.hh>
#include <maxscale/mock/routersession.hh>
#include <maxscale/mock/session.hh>
#include <maxscale/mock/client.hh>
#include "tempfile.hh"
using namespace std;

View File

@ -12,8 +12,8 @@
*/
#include <maxscale/cppdefs.hh>
#include "maxscale/filtermodule.hh"
#include "../../../../core/maxscale/modules.h"
#include <maxscale/filtermodule.hh>
#include "../../../core/maxscale/modules.h"
using std::auto_ptr;

View File

@ -11,8 +11,8 @@
* Public License.
*/
#include "maxscale/module.hh"
#include "../../../../core/maxscale/modules.h"
#include <maxscale/module.hh>
#include "../../../core/maxscale/modules.h"
namespace maxscale
{

View File

@ -12,7 +12,7 @@
*/
#include "maxscale/queryclassifiermodule.hh"
#include "../../../../core/maxscale/modules.h"
#include "../../../core/maxscale/modules.h"
namespace maxscale
{