Skip to content

Commit

Permalink
tests: ServerSessionHandlerTest: set DB file path
Browse files Browse the repository at this point in the history
Broken since ec17dfc (moving to development on meego.gitorious.org) when
the default path moved from /tmp/... to /etc/... (permission denied).
  • Loading branch information
martyone committed Jun 4, 2014
1 parent cad9997 commit 6f66898
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests_meego/servertests/ServerSessionHandlerTest.cpp
Expand Up @@ -45,15 +45,18 @@

using namespace DataSync;

static QString DBFILE( "/tmp/serversessionhandler.db" );

void ServerSessionHandlerTest::initTestCase()
{
iDbHandler = new DatabaseHandler( "/tmp/serversessionhandler.db");
iDbHandler = new DatabaseHandler( DBFILE );
iClientId = QString("clientId");
iConfig = new SyncAgentConfig();
QString localDb = "localcontacts";
iStorage = new MockStorage( localDb );
iTransport = new MockTransport(QString("data/transport_initrequest_nohdr.txt"));
iConfig->setTransport(iTransport);
iConfig->setDatabaseFilePath( DBFILE );
const SyncAgentConfig *tempConstConfig = iConfig;
iHandler = new ServerSessionHandler(tempConstConfig);
}
Expand Down Expand Up @@ -284,6 +287,7 @@ void ServerSessionHandlerTest::regression_NB166841_01()
const QString nextAnchor( "0" );

SyncAgentConfig config;
config.setDatabaseFilePath( DBFILE );
ServerSessionHandler sessionHandler(&config);

MockStorage* storage = new MockStorage( sourceURI );
Expand All @@ -310,6 +314,7 @@ void ServerSessionHandlerTest::regression_NB166841_02()
const QString nextAnchor( "0" );

SyncAgentConfig config;
config.setDatabaseFilePath( DBFILE );
ServerSessionHandler sessionHandler(&config);

MockStorage* storage = new MockStorage( sourceURI, mimeURI );
Expand All @@ -335,6 +340,7 @@ void ServerSessionHandlerTest::regression_NB166841_03()
const QString nextAnchor( "0" );

SyncAgentConfig config;
config.setDatabaseFilePath( DBFILE );
ServerSessionHandler sessionHandler(&config);

SyncMode syncMode(DIRECTION_TWO_WAY, INIT_CLIENT, TYPE_SLOW);
Expand All @@ -353,6 +359,7 @@ void ServerSessionHandlerTest::regression_NB166841_04()
const QString targetURI( "./source" );

SyncAgentConfig config;
config.setDatabaseFilePath( DBFILE );
ServerSessionHandler sessionHandler(&config);

MockStorage* storage = new MockStorage( sourceURI );
Expand Down Expand Up @@ -380,6 +387,7 @@ void ServerSessionHandlerTest::testSetClientRefresh()
SyncMode nextSyncMode(DIRECTION_FROM_CLIENT,INIT_CLIENT,TYPE_FAST);

SyncAgentConfig config;
config.setDatabaseFilePath( DBFILE );
ServerSessionHandler sessionHandler(&config);

MockStorage* storage = new MockStorage( sourceURI );
Expand Down

0 comments on commit 6f66898

Please sign in to comment.