diff options
author | Ove Kåven <ovek@arcticnet.no> | 2012-08-12 19:34:03 +0200 |
---|---|---|
committer | Ove Kåven <ovek@arcticnet.no> | 2012-08-12 19:34:03 +0200 |
commit | 0352113e8dd2e6662706a3c96171a3c19f7989b9 (patch) | |
tree | 7c69b2ed644d931d6cd2089c363fcc7717490810 /test | |
parent | f314480d3eb0b11509d42ed0c357b2013f23b0c1 (diff) | |
parent | a987801c143dd609ac6780a7003490d478248ace (diff) |
Merge tag 'syncevolution-1-2-99-4' into FREMANTLE-1-2-99-4
Diffstat (limited to 'test')
-rwxr-xr-x | test/dbus-session.sh | 4 | ||||
-rw-r--r-- | test/synccompare.pl | 2 | ||||
-rw-r--r-- | test/test-dbus-concurrency.txt | 32 | ||||
-rwxr-xr-x | test/test-dbus.py | 41 | ||||
-rw-r--r-- | test/testcases/eds_event.ics.googleactivesync.tem.patch | 223 | ||||
-rw-r--r-- | test/testcases/eds_event.ics.radicale.tem.patch | 109 |
6 files changed, 400 insertions, 11 deletions
diff --git a/test/dbus-session.sh b/test/dbus-session.sh index 2df89dcf..76c522b5 100755 --- a/test/dbus-session.sh +++ b/test/dbus-session.sh @@ -39,7 +39,7 @@ trap atexit EXIT E_CAL_PID= E_BOOK_PID= case "$@" in *valgrind*) prefix=`echo $@ | perl -p -e 's;.*?(\S*/?valgrind\S*).*;$1;'`;; - *syncevolution\ *|*client-test\ *|*bash*|*test-dbus.py\ *|*gdb\ *) prefix=env;; + *setup-syncevolution.sh*|*syncevolution\ *|*client-test\ *|*bash*|*test-dbus.py\ *|*gdb\ *) prefix=env;; *) prefix=;; # don't start EDS esac akonadi=$prefix @@ -64,7 +64,7 @@ else DBUS_SESSION_SH_EDS_BASE= fi -sleep $SLEEP +[ "$SLEEP" ] && sleep $SLEEP # run program "$@" diff --git a/test/synccompare.pl b/test/synccompare.pl index 2567fa73..6c4cf4d3 100644 --- a/test/synccompare.pl +++ b/test/synccompare.pl @@ -662,7 +662,7 @@ sub NormalizeItem { s/^(FN|X-EVOLUTION-FILE-AS|CATEGORIES)(;[^:;\n]*)*:.*\r?\n?//gm; } - if ($googleeas) { + if ($googleeas || $exchange) { # temporarily ignore modified properties s/^(BDAY|X-ANNIVERSARY)(;[^:;\n]*)*:.*\r?\n?//gm; } diff --git a/test/test-dbus-concurrency.txt b/test/test-dbus-concurrency.txt new file mode 100644 index 00000000..a3b46346 --- /dev/null +++ b/test/test-dbus-concurrency.txt @@ -0,0 +1,32 @@ +master: + +testConcurrency (__main__.TestLocalSync) +TestLocalSync.testConcurrency - D-Bus server must remain responsive while sync runs ... ok + +---------------------------------------------------------------------- +Ran 1 test in 7.814s + +$ cat temp-test-dbus/cache/syncevolution/server-2012-01-21-20-44/status.ini +status = 20017 +start = 1327175092, 2012-01-21 20:44:52 +0100 +end = 1327175094, 2012-01-21 20:44:54 +0100 +source-addressbook-mode = disabled +source-addressbook-first = false +source-addressbook-resume = false +source-addressbook-status = 0 +source-addressbook-backup-before = -1 +source-addressbook-backup-after = -1 + + +[2012-01-21 20:44:52.365] parent: read select on message channel 0.000000000s +[2012-01-21 20:44:54.111] quit transport as requested as part of GLib event loop +[2012-01-21 20:44:54.111] aborting after TransportAgent::FAILED as requested by user + +=> source not active, no error in it +=> abort detected in loop, not in transport + + +for-master/fork-local-sync: + +sync *runs* ?! + diff --git a/test/test-dbus.py b/test/test-dbus.py index 553d4b54..c38bf185 100755 --- a/test/test-dbus.py +++ b/test/test-dbus.py @@ -2518,8 +2518,7 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): Timeout.removeTimeout(timeout_handler) self.assertEqual(self.lastState, "done") - @timeout(60) - def testAutoSyncNetworkFailure(self): + def doAutoSyncNetworkFailure(self): """TestSessionAPIsDummy.testAutoSyncNetworkFailure - test that auto-sync is triggered, fails due to (temporary?!) network error here""" self.setupConfig() # enable auto-sync @@ -2529,7 +2528,7 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): # or any other D-Bus test. config[""]["syncURL"] = "http://no-such-domain.foobar" config[""]["autoSync"] = "1" - config[""]["autoSyncDelay"] = "0" + config[""]["autoSyncDelay"] = "1" config[""]["autoSyncInterval"] = "10s" config[""]["password"] = "foobar" self.session.SetConfig(True, False, config, utf8_strings=True) @@ -2600,6 +2599,17 @@ class TestSessionAPIsDummy(DBusUtil, unittest.TestCase): self.runTestDBusCheck = checkDBusLog @timeout(60) + def testAutoSyncNetworkFailure(self): + """TestSessionAPIsDummy.testAutoSyncNetworkFailure - test that auto-sync is triggered, fails due to (temporary?!) network error here""" + self.doAutoSyncNetworkFailure() + + @timeout(60) + @property("ENV", "DBUS_TEST_CONNMAN=session DBUS_TEST_NETWORK_MANAGER=session") + def testAutoSyncNoNetworkManager(self): + """TestSessionAPIsDummy.testAutoSyncNoNetworkManager - test that auto-sync is triggered despite having neither NetworkManager nor Connman, fails due to (temporary?!) network error here""" + self.doAutoSyncNetworkFailure() + + @timeout(60) def doAutoSyncLocalConfigError(self, notifyLevel): self.setupConfig() # enable auto-sync @@ -6766,6 +6776,13 @@ END:VCARD self.assertNoErrors(err) self.assertEqualDiff(john + "\n" + joan, out) + # export all into file + exportfile = xdg_root + "/export.vcf" + out, err, code = self.runCmdline(["--export", exportfile, + "foo", "bar"]) + self.assertNoErrors(err) + self.assertEqualDiff(john + "\n" + joan, open(exportfile).read()) + # export one out, err, code = self.runCmdline(["--export", "-", "backend=file", @@ -6781,6 +6798,13 @@ END:VCARD self.assertNoErrors(err) self.assertEqualDiff(john, out) + # export one into file + exportfile = xdg_root + "/export.vcf" + out, err, code = self.runCmdline(["--export", exportfile, + "foo", "bar", "1"]) + self.assertNoErrors(err) + self.assertEqualDiff(john, open(exportfile).read()) + # Copied from C++ test: # TODO: check configuration of just the source as @foo bar # without peer @@ -6879,10 +6903,11 @@ END:VCARD # The error message is not particularly informative, but the error should # not occur, so let it be... Also, the "connection is closed" error only # occurs occasionally. - out = out.replace('''[ERROR] The connection is closed -''', '') - self.assertEqualDiff(out, '''[ERROR syncevo-dbus-server] child process quit because of signal 9 -''') + self.assertNotEqual(out, '') + self.assertTrue('''[ERROR] The connection is closed +''' in out or + '''[ERROR syncevo-dbus-server] child process quit because of signal 9 +''' in out) @property("debug", False) @property("ENV", "SYNCEVOLUTION_LOCAL_CHILD_DELAY2=60") @@ -6937,7 +6962,7 @@ END:VCARD # occurs occasionally. if out.startswith('[ERROR] child process quit because of signal 9'): out = out.replace('''[ERROR] sending message to child failed: The connection is closed --''', '') +''', '') self.assertEqualDiff(out, '''[ERROR] child process quit because of signal 9 [ERROR] local transport failed: child process quit because of signal 9 [INFO] Transport giving up after x retries and y:zzmin diff --git a/test/testcases/eds_event.ics.googleactivesync.tem.patch b/test/testcases/eds_event.ics.googleactivesync.tem.patch new file mode 100644 index 00000000..b7beadf8 --- /dev/null +++ b/test/testcases/eds_event.ics.googleactivesync.tem.patch @@ -0,0 +1,223 @@ +@@ -2,19 +2,16 @@ + PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+ VERSION:2.0
+ BEGIN:VTIMEZONE
+-TZID:/softwarestudio.org/Olson_20011030_5/Europe/Berlin
+-X-LIC-LOCATION:Europe/Berlin
++TZID:Standard Timezone
+ BEGIN:DAYLIGHT
+ TZOFFSETFROM:+0100
+ TZOFFSETTO:+0200
+-TZNAME:CEST
+ DTSTART:19700329T020000
+ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
+ END:DAYLIGHT
+ BEGIN:STANDARD
+ TZOFFSETFROM:+0200
+ TZOFFSETTO:+0100
+-TZNAME:CET
+ DTSTART:19701025T030000
+ RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
+ END:STANDARD
+@@ -23,9 +20,9 @@ + SUMMARY:phone meeting
+ DESCRIPTION:let's talk
+ CATEGORIES:MEETING
+-DTEND;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
++DTEND;TZID=Standard Timezone:
+ 20060406T163000
+-DTSTART;TZID=/softwarestudio.org/Olson_20011030_5/Europe/Berlin:
++DTSTART;TZID=Standard Timezone:
+ 20060406T160000
+ UID:20060406T211449Z-4562-727-1-63@gollum
+ DTSTAMP:20060406T211449Z
+@@ -35,6 +32,7 @@ + CLASS:PUBLIC
+ TRANSP:OPAQUE
+ SEQUENCE:1
++RRULE:FREQ=DAILY;INTERVAL=1
+ END:VEVENT
+ END:VCALENDAR
+
+@@ -53,7 +51,7 @@ + CLASS:PUBLIC
+ CREATED:20060416T203724Z
+ LAST-MODIFIED:20060416T203758Z
+-RRULE:FREQ=WEEKLY;UNTIL=20060427T173000Z;INTERVAL=1;BYDAY=TH
++RRULE:FREQ=WEEKLY;UNTIL=20060427T170000Z;INTERVAL=1;BYDAY=TH
+ END:VEVENT
+ END:VCALENDAR
+
+@@ -90,7 +88,7 @@ + CLASS:PUBLIC
+ CREATED:20060416T203924Z
+ LAST-MODIFIED:20060416T203949Z
+-RRULE:FREQ=MONTHLY;INTERVAL=1;UNTIL=20060606T173000Z
++RRULE:BYMONTHDAY=6;FREQ=MONTHLY;INTERVAL=1;UNTIL=20060606T173000Z
+ END:VEVENT
+ END:VCALENDAR
+
+@@ -106,7 +104,7 @@ + SEQUENCE:2
+ SUMMARY:recurrence\, yearly\, two times
+ CLASS:PUBLIC
+-RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20070406T180000Z
++RRULE:BYMONTH=4;BYMONTHDAY=6;FREQ=YEARLY;INTERVAL=1;UNTIL=20070406T180000Z
+ CREATED:20060416T204021Z
+ LAST-MODIFIED:20060416T204021Z
+ END:VEVENT
+@@ -193,11 +191,28 @@ + BEGIN:VCALENDAR
+ PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+ VERSION:2.0
++BEGIN:VTIMEZONE
++TZID:(UTC-05:00) Eastern Time (US & C
++BEGIN:STANDARD
++DTSTART:19701101T020000
++RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
++TZOFFSETFROM:-0400
++TZOFFSETTO:-0500
++TZNAME:(UTC-05:00) Eastern Time (US & C
++END:STANDARD
++BEGIN:DAYLIGHT
++DTSTART:19700308T020000
++RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
++TZOFFSETFROM:-0500
++TZOFFSETTO:-0400
++TZNAME:(UTC-05:00) Eastern Time (US & C
++END:DAYLIGHT
++END:VTIMEZONE
+ BEGIN:VEVENT
+ UID:20060416T204136Z-4272-727-1-247@gollum
+ DTSTAMP:20060416T204136Z
+-DTSTART:20060406T190000Z
+-DTEND:20060406T193000Z
++DTSTART;TZID="(UTC-05:00) Eastern Time (US & C":20060406T150000
++DTEND;TZID="(UTC-05:00) Eastern Time (US & C":20060406T153000
+ TRANSP:TRANSPARENT
+ SEQUENCE:4
+ SUMMARY:all fields
+@@ -218,7 +233,7 @@ + BEGIN:VALARM
+ X-EVOLUTION-ALARM-UID:20060416T204833Z-4250-727-1-85@gollum
+ ACTION:DISPLAY
+-DESCRIPTION:This is an event reminder
++DESCRIPTION:Reminder
+ TRIGGER;VALUE=DURATION;RELATED=START:-PT1H
+ END:VALARM
+ END:VEVENT
+@@ -228,29 +243,6 @@ + PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+ VERSION:2.0
+ BEGIN:VEVENT
+-UID:20060416T204922Z-4272-727-1-250@gollum
+-DTSTAMP:20060416T204922Z
+-DTSTART:20060406T193000Z
+-DTEND:20060406T200000Z
+-TRANSP:OPAQUE
+-SEQUENCE:2
+-CATEGORIES:BUSINESS,MEETING
+-SUMMARY:meeting invitation
+-CLASS:PUBLIC
+-ORGANIZER;CN=Patrick Ohly:MAILTO:Patrick.Ohly@gmx.de
+-ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;
+- RSVP=TRUE;CN=Patrick Ohly;LANGUAGE=en:MAILTO:Patrick.Ohly@gmx.de
+-ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
+- RSVP=TRUE;LANGUAGE=en:MAILTO:john@bar.com
+-CREATED:20060416T205003Z
+-LAST-MODIFIED:20060416T205003Z
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+ UID:20080407T193125Z-19554-727-1-50@gollum
+ DTSTAMP:20080407T193125Z
+ DTSTART:20080406T090000Z
+@@ -260,7 +252,7 @@ + SUMMARY:Recurring
+ DESCRIPTION:recurs each Sonday\, 10 times
+ CLASS:PUBLIC
+-RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=SU;UNTIL=20080608T090000Z
++RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=SU;COUNT=10
+ CREATED:20080407T193241Z
+ LAST-MODIFIED:20080407T193241
+ END:VEVENT
+@@ -341,75 +333,3 @@ + DESCRIPTION:second instance modified\, single detached recurrence
+ END:VEVENT
+ END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50-YY@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080413T090000Z
+-DTEND:20080413T093000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring 3: Modified
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080413T090000Z
+-DESCRIPTION:second instance modified
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50-YY@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080420T100000Z
+-DTEND:20080420T103000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring 3: Modified II
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080420T090000Z
+-DESCRIPTION:third instance modified\, different time
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VTIMEZONE
+-TZID:EST/EDT
+-BEGIN:STANDARD
+-TZOFFSETFROM:-0400
+-TZOFFSETTO:-0500
+-TZNAME:EST
+-DTSTART:19671029T020000
+-RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=-1SU
+-END:STANDARD
+-BEGIN:DAYLIGHT
+-TZOFFSETFROM:-0500
+-TZOFFSETTO:-0400
+-TZNAME:EDT
+-DTSTART:19870405T020000
+-RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=1SU
+-END:DAYLIGHT
+-END:VTIMEZONE
+-BEGIN:VEVENT
+-UID:20060416T205224Z-4272-727-1-251@gollum
+-DTSTAMP:20060416T205224Z
+-DTSTART;TZID=EST/EDT:20060406T140000
+-DTEND;TZID=EST/EDT:20060406T143000
+-TRANSP:OPAQUE
+-SEQUENCE:2
+-SUMMARY:timezone New York with custom definition for 2006
+-CLASS:PUBLIC
+-CREATED:20060416T205301Z
+-LAST-MODIFIED:20060416T205301Z
+-END:VEVENT
+-END:VCALENDAR
diff --git a/test/testcases/eds_event.ics.radicale.tem.patch b/test/testcases/eds_event.ics.radicale.tem.patch new file mode 100644 index 00000000..f82376be --- /dev/null +++ b/test/testcases/eds_event.ics.radicale.tem.patch @@ -0,0 +1,109 @@ +@@ -270,44 +270,6 @@ + PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+ VERSION:2.0
+ BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080413T090000Z
+-DTEND:20080413T093000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring: Modified
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080413T090000Z
+-DESCRIPTION:second instance modified
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080420T100000Z
+-DTEND:20080420T103000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring: Modified II
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080420T090000Z
+-DESCRIPTION:third instance modified\, different time
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+ UID:20080407T193125Z-19554-727-1-50-XX@gollum
+ DTSTAMP:20080407T193125Z
+ DTSTART:20080406T090000Z
+@@ -323,63 +285,6 @@ + END:VEVENT
+ END:VCALENDAR
+
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50-XX@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080413T090000Z
+-DTEND:20080413T093000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring 2: Modified
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080413T090000Z
+-DESCRIPTION:second instance modified\, single detached recurrence
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50-YY@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080413T090000Z
+-DTEND:20080413T093000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring 3: Modified
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080413T090000Z
+-DESCRIPTION:second instance modified
+-END:VEVENT
+-END:VCALENDAR
+-
+-BEGIN:VCALENDAR
+-PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+-VERSION:2.0
+-BEGIN:VEVENT
+-UID:20080407T193125Z-19554-727-1-50-YY@gollum
+-DTSTAMP:20080407T193125Z
+-DTSTART:20080420T100000Z
+-DTEND:20080420T103000Z
+-TRANSP:OPAQUE
+-SEQUENCE:7
+-SUMMARY:Recurring 3: Modified II
+-CLASS:PUBLIC
+-CREATED:20080407T193241Z
+-LAST-MODIFIED:20080407T193647
+-RECURRENCE-ID:20080420T090000Z
+-DESCRIPTION:third instance modified\, different time
+-END:VEVENT
+-END:VCALENDAR
+-
+ BEGIN:VCALENDAR
+ PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+ VERSION:2.0
|