Goolge + vcard21: bugzilla #2423, ignore some properties
ignore some properties that google server will get lost not comparing PHOTO encoded data because google always return jpg format Ignore value mismatch in FN, NOTE, ORG and TEL Add google specific case to workaround a test failure because of delele failed to clean the previous data (A know issue in server) slightly change a test case to workaround google google server can not delete cleanly; if a later test sends a contact with the same N field, the server will trigger a client side update which is not expected.
This commit is contained in:
parent
d034e17474
commit
52f736fc37
|
@ -2167,7 +2167,7 @@ void SyncTests::testOneWayFromServer() {
|
|||
|
||||
// add one item on first client, copy to server, and check change tracking via second source
|
||||
for (it = sources.begin(); it != sources.end(); ++it) {
|
||||
it->second->insertManyItems(it->second->createSourceA, 1, 1);
|
||||
it->second->insertManyItems(it->second->createSourceA, 200, 1);
|
||||
}
|
||||
doSync("send",
|
||||
SyncOptions(SYNC_TWO_WAY,
|
||||
|
|
57
test/README.google
Normal file
57
test/README.google
Normal file
|
@ -0,0 +1,57 @@
|
|||
This document is used to show interoperability test information with google server.
|
||||
http://bugzilla.moblin.org/show_bug.cgi?id=2423
|
||||
|
||||
* The google Server's device information
|
||||
Man=Google
|
||||
Mod=Sync
|
||||
SwV=0.01
|
||||
HwV=-
|
||||
OEM=-
|
||||
DevID=Google
|
||||
DevTyp=server
|
||||
VerDTD=1.2
|
||||
UTC=
|
||||
SupportLargeObjs=true
|
||||
SupportNumberOfChanges=true
|
||||
|
||||
* Test Environment Variables Settings
|
||||
CLIENT_TEST_SERVER=google CLIENT_TEST_XML=0 CLIENT_TEST_MAX_ITEMSIZE=2048 \
|
||||
CLIENT_TEST_EVOLUTION_PREFIX=file:///tmp/test/ \
|
||||
CLIENT_TEST_SKIP=Client::Sync::vcard21::testRefreshFromClientSync, \
|
||||
Client::Sync::vcard21::testRefreshFromClientSemantic, \
|
||||
Client::Sync::vcard21::testRefreshStatus, \
|
||||
Client::Sync::vcard21::testOneWayFromClient, \
|
||||
Client::Sync::vcard21::testItemsXML, \
|
||||
Client::Sync::vcard21::testRetry,Client::Sync::vcard21::Suspend
|
||||
|
||||
|
||||
* Data formats we need to test:
|
||||
Client::Sync::vcard21
|
||||
|
||||
* Know Limitations in google server:
|
||||
Only supports Contact Sync over SyncML and only supports vcard2.1 format.
|
||||
Only supports WBXML for transmitting.
|
||||
Don't support one-way-from-client and refresh-from-client sync.
|
||||
Return 200(OK) instead of 201(Added) for replace operation from client.
|
||||
Delete operation does not permanently remove items.
|
||||
|
||||
VCard21
|
||||
-- Below properties are lost:
|
||||
X-EVOLUTION-FILE-AS X-AIM X-EVOLUTION-UI-SLOT X-ANNIVERSARY X-ASSISTANT
|
||||
X-EVOLUTION-BLOG-URL X-EVOLUTION-VIDEO-URL X-GROUPWISE X-ICQ X-MANAGER
|
||||
X-SPOUSE X-MOZILLA-HTML X-YAHOO CATEGORIES NICKNAME BDAY URL FBURL CALURI
|
||||
ROLE
|
||||
-- 'FN' value mismatch
|
||||
-- 'NOTE' lost ';'
|
||||
-- 'TEL' do not support 'CAR' sub type
|
||||
-- 'ORG' lost ';' as the delimiter
|
||||
|
||||
* Known test failures:
|
||||
Client::Sync::vcard21
|
||||
-- Client::Sync::vcard21::testRefreshFromClientSync
|
||||
Client::Sync::vcard21::testRefreshFromClientSemantic
|
||||
Client::Sync::vcard21::testRefreshStatus
|
||||
Client::Sync::vcard21::testOneWayFromClient
|
||||
Client::Sync::vcard21::testItemsXML
|
||||
Client::Sync::vcard21::Retry
|
||||
Client::Sync::vcard21::Suspend
|
|
@ -64,6 +64,7 @@ my $synthesis = $server =~ /synthesis/;
|
|||
|
||||
my $egroupware = $server =~ /egroupware/;
|
||||
my $funambol = $server =~ /funambol/;
|
||||
my $google = $server =~ /google/;
|
||||
my $evolution = $client =~ /evolution/;
|
||||
my $addressbook = $client =~ /addressbook/;
|
||||
|
||||
|
@ -234,7 +235,7 @@ sub Normalize {
|
|||
s;^BEGIN:VTIMEZONE.*?^TZID:/[^/\n]*/[^/\n]*/(\S+).*^END:VTIMEZONE;BEGIN:VTIMEZONE\nTZID:$1 [...]\nEND:VTIMEZONE;gms;
|
||||
s;TZID=/[^/\n]*/[^/\n]*/(.*)$;TZID=$1;gm;
|
||||
|
||||
if ($scheduleworld || $egroupware || $synthesis || $addressbook || $funambol) {
|
||||
if ($scheduleworld || $egroupware || $synthesis || $addressbook || $funambol ||$google) {
|
||||
# does not preserve X-EVOLUTION-UI-SLOT=
|
||||
s/^(\w+)([^:\n]*);X-EVOLUTION-UI-SLOT=\d+/$1$2/mg;
|
||||
}
|
||||
|
@ -260,6 +261,23 @@ sub Normalize {
|
|||
s/^(TEL.*);TYPE=PREF/$1/mg;
|
||||
}
|
||||
|
||||
if($google) {
|
||||
# ignore the PHOTO encoding data
|
||||
s/^PHOTO(.*?): .*\n/^PHOTO$1: [...]\n/mg;
|
||||
# FN propertiey is not correct
|
||||
s/^FN:.*\n/FN$1: [...]\n/mg;
|
||||
# ';' in NOTE is lost by the server: ; in middle is replace by white space
|
||||
# while ; in the end is omitted.
|
||||
while (s!^NOTE:(.*)\\\;(.+)\n!NOTE:$1 $2\n!mg) {}
|
||||
s!^NOTE:(.*)\\\;\n!NOTE:$1\n!mg;
|
||||
# ';' in ORG is lost
|
||||
while (s!^ORG:(.*)\;(.*)\n!ORG:$1 $2\n!mg) {}
|
||||
# Not support car type in telephone
|
||||
s!^TEL\;TYPE=CAR(.*)\n!TEL$1\n!mg;
|
||||
# some properties are lost
|
||||
s/^(X-EVOLUTION-FILE-AS|NICKNAME|BDAY|CATEGORIES|CALURI|FBURL|ROLE|URL|X-AIM|X-EVOLUTION-UI-SLOT|X-ANNIVERSARY|X-ASSISTANT|X-EVOLUTION-BLOG-URL|X-EVOLUTION-VIDEO-URL|X-GROUPWISE|X-ICQ|X-MANAGER|X-SPOUSE|X-MOZILLA-HTML|X-YAHOO)(;[^:;\n]*)*:.*\r?\n?//gm;
|
||||
}
|
||||
|
||||
if ($addressbook) {
|
||||
# some properties cannot be stored
|
||||
s/^(X-MOZILLA-HTML|X-EVOLUTION-FILE-AS|X-EVOLUTION-ANNIVERSARY|X-EVOLUTION-BLOG-URL|X-EVOLUTION-VIDEO-URL|X-GROUPWISE|ROLE|CATEGORIES|FBURL|CALURI|FN)(;[^:;\n]*)*:.*\r?\n?//gm;
|
||||
|
|
9
test/testcases/vcard30.vcf.google.tem.patch
Normal file
9
test/testcases/vcard30.vcf.google.tem.patch
Normal file
|
@ -0,0 +1,9 @@
|
|||
@@ -166,7 +166,7 @@
|
||||
X-EVOLUTION-SPOUSE:Joan Doe
|
||||
NOTE:This is a test case which uses almost all Evolution fields.
|
||||
FN:John Doe
|
||||
-N:Doe;John;;;
|
||||
+N:NewDoe;John;;;
|
||||
X-EVOLUTION-FILE-AS:Doe\, John
|
||||
CATEGORIES:TEST
|
||||
X-EVOLUTION-BLOG-URL:web log
|
Loading…
Reference in a new issue