summaryrefslogtreecommitdiff
path: root/test/ClientTest.cpp
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2012-07-02 10:16:13 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2012-07-02 10:16:13 +0200
commitbfdc3977e2a4c40449b72506eb2c3b1982537ba8 (patch)
treee15f885f538207fe1a4a0084dd9cff70b56eaba9 /test/ClientTest.cpp
parent8f613fa1bb9312b70dd45a7f562c06850a68c10b (diff)
testing: fixed testConversion
The testConversion test was conceptually broken: it only passed for peers where synccompare filtered out X-EVOLUTION-UI-SLOT, because that parameter always gets dropped during import/export. It's disable by default and needs to be enabled via DevInf, which is never received during this test. synccompare also might have hidden other kinds of data loss, depending on which workarounds were enabled via CLIENT_TEST_SERVER. The fix is to unset CLIENT_TEST_SERVER and enable removal of X-EVOLUTION-UI-SLOT via CLIENT_TEST_STRIP_PARAMETERS.
Diffstat (limited to 'test/ClientTest.cpp')
-rw-r--r--test/ClientTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ClientTest.cpp b/test/ClientTest.cpp
index 32719328..75081bc0 100644
--- a/test/ClientTest.cpp
+++ b/test/ClientTest.cpp
@@ -4146,6 +4146,17 @@ bool SyncTests::doConversionCallback(bool *success,
}
}
out.close();
+
+ // The test used peer-specific test cases, but the actual
+ // result does not depend on the peer because we haven't
+ // received the peer's DevInf at the point where we
+ // import/export the test cases (=> don't apply peer-specific
+ // synccompare workarounds).
+ //
+ // Due to the lack of DevInf, properties and parameters which
+ // need to be enabled via DevInf get lost (= filter them out).
+ ScopedEnvChange env("CLIENT_TEST_SERVER", "");
+ ScopedEnvChange envParams("CLIENT_TEST_STRIP_PARAMETERS", "X-EVOLUTION-UI-SLOT");
CT_ASSERT(config->m_compare(client, testcases, converted));
}