Test: Also register file:calendar+todo test for file backend

Since we support both evolution and file backend for supported test
case in client-test.
It might be useful running client-test with calendar+todo test cases
using file backend. (It supports evolution backend only without this
patch).
This commit is contained in:
Chen Congwu 2010-03-26 13:03:26 +08:00 committed by Patrick Ohly
parent f035d85aee
commit 752a234872
4 changed files with 20 additions and 11 deletions

View File

@ -338,6 +338,7 @@ public:
virtual void updateConfig(ClientTestConfig &config) const
{
config.type = "virtual:text/x-vcalendar";
config.subConfigs = "ical20,itodo20";
}
} superTest;

View File

@ -171,6 +171,18 @@ public:
}
} ITodo20Test;
static class SuperTest : public RegisterSyncSourceTest {
public:
SuperTest() : RegisterSyncSourceTest("file_calendar+todo", "calendar+todo") {}
virtual void updateConfig(ClientTestConfig &config) const
{
config.type = "virtual:text/x-vcalendar";
config.subConfigs = "file_ical20,file_itodo20";
}
} superTest;
}
#endif // ENABLE_FILE

View File

@ -243,11 +243,7 @@ public:
// always set these properties: they might have changed since the last run
string database = getDatabaseName(test->m_configName);
if (test->m_configName!="calendar+todo"){
sc->setDatabaseID(database);
} else {
sc->setDatabaseID("ical20,itodo20");
}
sc->setDatabaseID(database);
sc->setUser(m_evoUser);
sc->setPassword(m_evoPassword);
}
@ -403,6 +399,11 @@ private:
/** returns the name of the Evolution database */
string getDatabaseName(const string &configName) {
if (configName == "calendar+todo") {
return "ical20,itodo20";
} else if (configName == "file_calendar+todo") {
return "file_ical20,file_itodo20";
}
return m_evoPrefix + configName + "_" + m_clientID;
}
@ -417,11 +418,7 @@ private:
"_" + (isSourceA ? "A" : "B"));
// always set this property: the name might have changes since last test run
if (name != "calendar+todo") {
nodes.getProperties()->setProperty("evolutionsource", database.c_str());
} else {
nodes.getProperties()->setProperty("evolutionsource", "ical20,itodo20");
}
nodes.getProperties()->setProperty("evolutionsource", database.c_str());
nodes.getProperties()->setProperty("evolutionuser", evClient.m_evoUser.c_str());
nodes.getProperties()->setProperty("evolutionpassword", evClient.m_evoPassword.c_str());

View File

@ -4072,7 +4072,6 @@ void ClientTest::getTestData(const char *type, Config &config)
config.sizeProperty = "DESCRIPTION";
config.testcases = "testcases/imemo20.ics";
}else if (!strcmp (type, "calendar+todo")) {
config.subConfigs = "ical20,itodo20";
config.uri="";
config.sourceNameServerTemplate = "calendar+todo";
}