enable those linked item tests that 'dumb' sources can pass
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@735 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
parent
1ece885e8c
commit
3b88d491c8
|
@ -150,8 +150,7 @@ public:
|
|||
// Client::Source::file_ical20::testLinkedItemsInsertChildTwice
|
||||
//
|
||||
// Disable linked item testing to avoid this.
|
||||
config.parentItem =
|
||||
config.childItem = NULL;
|
||||
config.sourceKnowsItemSemantic = false;
|
||||
}
|
||||
} ICal20Test;
|
||||
|
||||
|
|
|
@ -219,8 +219,10 @@ void LocalTests::addTests() {
|
|||
ADD_TEST(LocalTests, testLinkedItemsChildChangesParent);
|
||||
ADD_TEST(LocalTests, testLinkedItemsRemoveParentFirst);
|
||||
ADD_TEST(LocalTests, testLinkedItemsRemoveNormal);
|
||||
ADD_TEST(LocalTests, testLinkedItemsInsertParentTwice);
|
||||
ADD_TEST(LocalTests, testLinkedItemsInsertChildTwice);
|
||||
if (config.sourceKnowsItemSemantic) {
|
||||
ADD_TEST(LocalTests, testLinkedItemsInsertParentTwice);
|
||||
ADD_TEST(LocalTests, testLinkedItemsInsertChildTwice);
|
||||
}
|
||||
if (config.parentItemUpdate) {
|
||||
ADD_TEST(LocalTests, testLinkedItemsParentUpdate);
|
||||
ADD_TEST(LocalTests, testLinkedItemsInsertBothUpdateParent);
|
||||
|
@ -2657,6 +2659,7 @@ void ClientTest::getTestData(const char *type, Config &config)
|
|||
memset(&config, 0, sizeof(config));
|
||||
char *numitems = getenv("CLIENT_TEST_NUM_ITEMS");
|
||||
config.numItems = numitems ? atoi(numitems) : 100;
|
||||
config.sourceKnowsItemSemantic = true;
|
||||
|
||||
if (!strcmp(type, "vcard30")) {
|
||||
config.sourceName = "vcard30";
|
||||
|
|
|
@ -365,6 +365,19 @@ class ClientTest {
|
|||
# define LINKED_ITEMS_RELAXED_SEMANTIC 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Overwrite the default 'true' with 'false' to disable
|
||||
* tests which assume that the source being tested
|
||||
* follows certain conventions for the items being exchanged.
|
||||
*
|
||||
* For example, testLinkedItemsInsertParentTwice inserts a
|
||||
* calendar event twice and expects that the source only keeps
|
||||
* one event because the UID has to be kept unique. A dumb
|
||||
* file sync source doesn't know that and would keep two copies
|
||||
* of the same event.
|
||||
*/
|
||||
bool sourceKnowsItemSemantic;
|
||||
|
||||
/**
|
||||
* called to dump all items into a file, required by tests which need
|
||||
* to compare items
|
||||
|
|
Loading…
Reference in New Issue