summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authordeva <deva>2009-08-07 12:25:42 +0000
committerdeva <deva>2009-08-07 12:25:42 +0000
commitdb44a85be6164a51b964169cd25a35b8252ee042 (patch)
tree32cea9d891aec0fdd1209df724dc866c01812f30 /server/src
parent2648381bc3f67a403de92dc38429ce65345786a8 (diff)
Make the server and queryhandlerpracro test scripts use the new testdb interface.
Diffstat (limited to 'server/src')
-rw-r--r--server/src/Makefile.am10
-rw-r--r--server/src/queryhandlerpracro.cc2
-rw-r--r--server/src/server.cc1
3 files changed, 8 insertions, 5 deletions
diff --git a/server/src/Makefile.am b/server/src/Makefile.am
index 399d7fa..eb52775 100644
--- a/server/src/Makefile.am
+++ b/server/src/Makefile.am
@@ -139,7 +139,7 @@ BASICFLAGS = -I.. -DHAVE_CONFIG_H $(CONFIG_CXXFLAGS) $(CONFIG_LIBS)
PARSERFILES = saxparser.cc
PARSERFLAGS = -lexpat
-DBFILES = database.cc pracrodao.cc pracrodaopgsql.cc
+DBFILES = database.cc pracrodao.cc pracrodaopgsql.cc pracrodaotest.cc
DBFLAGS = $(PQXX_LIBS) $(PQXX_CXXFLAGS)
test: $(TESTFILES)
@@ -159,9 +159,10 @@ TEST_WIDGETGENERATOR_FILES = \
widgetgenerator.cc \
xml_encode_decode.cc \
luaquerymapper.cc \
- $(BASICFILES)
+ $(BASICFILES) \
+ $(DBFILES)
test_widgetgenerator: $(TEST_WIDGETGENERATOR_FILES)
- @../../tools/test $(TEST_WIDGETGENERATOR_FILES) $(BASICFLAGS) $(LUA_LIBS)
+ @../../tools/test $(TEST_WIDGETGENERATOR_FILES) $(BASICFLAGS) $(LUA_LIBS) $(DBFLAGS)
TEST_CONFIGURATIONPARSER_FILES = \
configurationparser.cc \
@@ -292,7 +293,8 @@ TEST_SERVER_FILES = \
transactionparser.cc \
widgetgenerator.cc \
database.cc \
- pracrodao.cc \
+ pracrodao.cc \
+ pracrodaotest.cc \
pracrodaopgsql.cc \
luaresume.cc \
macroparser.cc \
diff --git a/server/src/queryhandlerpracro.cc b/server/src/queryhandlerpracro.cc
index e58e8c4..e26de0c 100644
--- a/server/src/queryhandlerpracro.cc
+++ b/server/src/queryhandlerpracro.cc
@@ -67,7 +67,7 @@ QueryResult QueryHandlerPracro::exec(Query &query)
int main()
{
- Database db("pgsql", Conf::database_addr, "", Conf::database_user, Conf::database_passwd, "");
+ Database db("testdb", Conf::database_addr, "", Conf::database_user, Conf::database_passwd, "");
QueryHandlerPracro qh(db, "2003791613");
diff --git a/server/src/server.cc b/server/src/server.cc
index a47eb28..a5a4880 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -445,6 +445,7 @@ int main()
{
Conf::xml_basedir = "../xml/";
Conf::server_port = 32100; // Make sure wo don't interrupt an already running server.
+ Conf::database_backend = "testdb";
pid_t pid = fork();
switch(pid) {