added CLIENT_TEST_EVOLUTION_USER/PASSWORD so that backends which require authentication can now also be tested

git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@714 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
Patrick Ohly 2008-08-09 08:57:30 +00:00
parent 545757d700
commit 9a1c64df48
1 changed files with 14 additions and 2 deletions

View File

@ -180,6 +180,8 @@ private:
* - CLIENT_TEST_EVOLUTION_PREFIX = a common "evolutionsource" prefix for *all*
* sources; the source name followed by "_[12]"
* is appended to get unique names
* - CLIENT_TEST_EVOLUTION_USER = sets the "evolutionuser" property of all sources
* - CLIENT_TEST_EVOLUTION_PASSWORD = sets the "evolutionpassword" property of all sources
* - CLIENT_TEST_SOURCES = comma separated list of active sources,
* names as selected in their RegisterSyncSourceTest
* instances
@ -226,6 +228,14 @@ public:
/* override Evolution database names? */
const char *evoprefix = getenv("CLIENT_TEST_EVOLUTION_PREFIX");
m_evoPrefix = evoprefix ? evoprefix : "SyncEvolution_Test_";
const char *evouser = getenv("CLIENT_TEST_EVOLUTION_USER");
if (evouser) {
m_evoUser = evouser;
}
const char *evopasswd = getenv("CLIENT_TEST_EVOLUTION_PASSWORD");
if (evopasswd) {
m_evoPassword = evopasswd;
}
/* check sources */
const char *sourcelist = getenv("CLIENT_TEST_SOURCES");
@ -378,8 +388,8 @@ private:
std::auto_ptr<TestEvolution> m_clientB;
const TestRegistry &m_configs;
/** prefix to be used for Evolution databases */
string m_evoPrefix;
/** prefix, username, password to be used for local databases */
string m_evoPrefix, m_evoUser, m_evoPassword;
/**
* The ClientTest framework identifies active configs with an integer.
@ -407,6 +417,8 @@ private:
// always set this property: the name might have changes since last test run
nodes.m_configNode->setProperty("evolutionsource", database.c_str());
nodes.m_configNode->setProperty("evolutionuser", evClient.m_evoUser.c_str());
nodes.m_configNode->setProperty("evolutionpassword", evClient.m_evoPassword.c_str());
EvolutionSyncSourceParams params(name,
nodes,