[evolution-data-server/gnome-3-28] Bug 795414 - Errors on delete of a detached instance
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-28] Bug 795414 - Errors on delete of a detached instance
- Date: Wed, 25 Apr 2018 14:15:14 +0000 (UTC)
commit f11ad5f41ba2cb373d2223a27061637ce706ba18
Author: Milan Crha <mcrha redhat com>
Date: Wed Apr 25 16:12:19 2018 +0200
Bug 795414 - Errors on delete of a detached instance
src/calendar/libedata-cal/e-cal-meta-backend.c | 77 +++-
tests/libedata-cal/components/invite-5.ics | 22 +
tests/libedata-cal/components/invite-6.ics | 22 +
tests/libedata-cal/components/invite-7.ics | 38 ++
tests/libedata-cal/test-cal-meta-backend.c | 705 ++++++++++++++++++++++++
5 files changed, 856 insertions(+), 8 deletions(-)
---
diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c
index 937b733..8920577 100644
--- a/src/calendar/libedata-cal/e-cal-meta-backend.c
+++ b/src/calendar/libedata-cal/e-cal-meta-backend.c
@@ -2048,6 +2048,10 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
if (!existing_comp)
existing_comp = master_comp;
+ /* Pick the first instance in case there's no master component */
+ if (!existing_comp)
+ existing_comp = instances->data;
+
/* Remember old and new components */
if (out_old_comp && existing_comp)
old_comp = e_cal_component_clone (existing_comp);
@@ -2069,11 +2073,17 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
case E_CAL_OBJ_MOD_THIS:
if (rid) {
if (existing_comp != master_comp) {
+ /* When it's the last detached instance, then remove all */
+ if (instances && instances->data == existing_comp && !instances->next) {
+ mod = E_CAL_OBJ_MOD_ALL;
+ break;
+ }
+
instances = g_slist_remove (instances, existing_comp);
g_clear_object (&existing_comp);
}
- if (existing_comp == master_comp && mod == E_CAL_OBJ_MOD_ONLY_THIS) {
+ if (existing_comp == master_comp && master_comp && mod == E_CAL_OBJ_MOD_ONLY_THIS) {
success = FALSE;
g_propagate_error (error, e_data_cal_create_error (ObjectNotFound, NULL));
} else {
@@ -2093,11 +2103,12 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
itt = icaltime_convert_to_zone (itt, icaltimezone_get_utc_timezone
());
}
- e_cal_util_remove_instances (e_cal_component_get_icalcomponent (master_comp),
itt, mod);
+ if (master_comp)
+ e_cal_util_remove_instances (e_cal_component_get_icalcomponent
(master_comp), itt, mod);
}
- if (success && out_new_comp)
- new_comp = e_cal_component_clone (master_comp);
+ if (success && out_new_comp && (master_comp || existing_comp))
+ new_comp = e_cal_component_clone (master_comp ? master_comp : existing_comp);
} else {
mod = E_CAL_OBJ_MOD_ALL;
}
@@ -2180,11 +2191,51 @@ ecmb_remove_object_sync (ECalMetaBackend *meta_backend,
if (*offline_flag == E_CACHE_IS_ONLINE) {
gchar *ical_string = NULL;
- g_warn_if_fail (e_cal_cache_get_component_as_string (cal_cache, uid, NULL,
&ical_string, cancellable, NULL));
+ /* Use the master object, if exists */
+ if (e_cal_cache_get_component_as_string (cal_cache, uid, NULL, &ical_string,
cancellable, NULL)) {
+ success = e_cal_meta_backend_remove_component_sync (meta_backend,
conflict_resolution, uid, extra, ical_string, cancellable, &local_error);
+
+ g_free (ical_string);
+ } else {
+ /* If no master object is available, then delete with the first
instance */
+ GSList *link;
+
+ for (link = instances; link && success; link = g_slist_next (link)) {
+ ECalComponent *comp = link->data;
+ ECalComponentId *id;
+ gchar *comp_extra = NULL;
+
+ if (!comp)
+ continue;
+
+ id = e_cal_component_get_id (comp);
+ if (!id)
+ continue;
+
+ if (!e_cal_cache_get_component_extra (cal_cache, id->uid,
id->rid, &comp_extra, cancellable, NULL)) {
+ comp_extra = NULL;
+ if (g_cancellable_set_error_if_cancelled
(cancellable, &local_error)) {
+ success = FALSE;
+ e_cal_component_free_id (id);
+ break;
+ }
+
+ g_warn_if_reached ();
+ }
+
+ ical_string = e_cal_component_get_as_string (comp);
- success = e_cal_meta_backend_remove_component_sync (meta_backend,
conflict_resolution, uid, extra, ical_string, cancellable, &local_error);
+ /* This pretends the first instance is the master object and
the implementations should count with it */
+ success = e_cal_meta_backend_remove_component_sync
(meta_backend, conflict_resolution, id->uid, comp_extra, ical_string, cancellable, &local_error);
- g_free (ical_string);
+ e_cal_component_free_id (id);
+ g_clear_pointer (&ical_string, g_free);
+ g_free (comp_extra);
+
+ /* Stop with the first instance */
+ break;
+ }
+ }
if (local_error) {
if (g_error_matches (local_error, G_IO_ERROR,
G_IO_ERROR_HOST_NOT_FOUND))
@@ -2346,10 +2397,20 @@ ecmb_receive_object_sync (ECalMetaBackend *meta_backend,
cal_backend = E_CAL_BACKEND (meta_backend);
registry = e_cal_backend_get_registry (cal_backend);
- /* just to check whether component exists in a cache */
+ /* Just to check whether component exists in the cache */
is_in_cache = e_cal_cache_contains (cal_cache, id->uid, NULL, E_CACHE_EXCLUDE_DELETED) ||
(id->rid && *id->rid && e_cal_cache_contains (cal_cache, id->uid, id->rid,
E_CACHE_EXCLUDE_DELETED));
+ /* For cases when there's no master object in the cache */
+ if (!is_in_cache) {
+ GSList *icalstrings = NULL;
+
+ if (e_cal_cache_get_components_by_uid_as_string (cal_cache, id->uid, &icalstrings,
cancellable, NULL)) {
+ is_in_cache = icalstrings && icalstrings->data;
+ g_slist_free_full (icalstrings, g_free);
+ }
+ }
+
mod = e_cal_component_is_instance (comp) ? E_CAL_OBJ_MOD_THIS : E_CAL_OBJ_MOD_ALL;
switch (method) {
diff --git a/tests/libedata-cal/components/invite-5.ics b/tests/libedata-cal/components/invite-5.ics
new file mode 100644
index 0000000..135fb91
--- /dev/null
+++ b/tests/libedata-cal/components/invite-5.ics
@@ -0,0 +1,22 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VEVENT
+UID:invite-detached
+DTSTAMP:20170308T180113Z
+DTSTART;VALUE=DATE:20180425
+DTEND;VALUE=DATE:20180426
+RRULE:FREQ=WEEKLY;UNTIL=20180627T220000Z;BYDAY=WE
+SEQUENCE:0
+ORGANIZER;CN=Organizer:MAILTO:organizer@no.where
+ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;
+ RSVP=TRUE;CN=User;LANGUAGE=en:MAILTO:user@no.where
+SUMMARY:Recurring invite
+TRANSP:OPAQUE
+CLASS:PUBLIC
+CREATED:20170308T180033Z
+LAST-MODIFIED:20170308T180058Z
+END:VEVENT
+END:VCALENDAR
diff --git a/tests/libedata-cal/components/invite-6.ics b/tests/libedata-cal/components/invite-6.ics
new file mode 100644
index 0000000..ff402da
--- /dev/null
+++ b/tests/libedata-cal/components/invite-6.ics
@@ -0,0 +1,22 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VEVENT
+UID:invite-detached
+RECURRENCE-ID:20180502T000000Z
+DTSTAMP:20170308T180122Z
+DTSTART:20180502T130000Z
+DTEND:20180502T133000Z
+SEQUENCE:2
+ORGANIZER;CN=Organizer:MAILTO:organizer@no.where
+ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;
+ RSVP=TRUE;CN=User;LANGUAGE=en:MAILTO:user@no.where
+SUMMARY:Detached instance of recurring invite
+TRANSP:OPAQUE
+CLASS:PUBLIC
+CREATED:20170308T180034Z
+LAST-MODIFIED:20170308T180059Z
+END:VEVENT
+END:VCALENDAR
diff --git a/tests/libedata-cal/components/invite-7.ics b/tests/libedata-cal/components/invite-7.ics
new file mode 100644
index 0000000..b425521
--- /dev/null
+++ b/tests/libedata-cal/components/invite-7.ics
@@ -0,0 +1,38 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Ximian//NONSGML Evolution Calendar//EN
+VERSION:2.0
+METHOD:REQUEST
+BEGIN:VEVENT
+UID:invite-detached
+RECURRENCE-ID:20180502T000000Z
+DTSTAMP:20170308T180122Z
+DTSTART:20180502T130000Z
+DTEND:20180502T133000Z
+SEQUENCE:2
+ORGANIZER;CN=Organizer:MAILTO:organizer@no.where
+ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;
+ RSVP=TRUE;CN=User;LANGUAGE=en:MAILTO:user@no.where
+SUMMARY:Detached instance of recurring invite
+TRANSP:OPAQUE
+CLASS:PUBLIC
+CREATED:20170308T180034Z
+LAST-MODIFIED:20170308T180059Z
+END:VEVENT
+BEGIN:VEVENT
+UID:invite-detached
+RECURRENCE-ID:20180509T000000Z
+DTSTAMP:20170308T180113Z
+DTSTART:20180509T140000Z
+DTEND:20180509T143000Z
+SEQUENCE:3
+ORGANIZER;CN=Organizer:MAILTO:organizer@no.where
+ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;
+ RSVP=TRUE;CN=User;LANGUAGE=en:MAILTO:user@no.where
+SUMMARY:Another detached instance of recurring invite
+TRANSP:OPAQUE
+CLASS:PUBLIC
+CREATED:20170308T180033Z
+LAST-MODIFIED:20170308T180058Z
+END:VEVENT
+END:VCALENDAR
diff --git a/tests/libedata-cal/test-cal-meta-backend.c b/tests/libedata-cal/test-cal-meta-backend.c
index 4d410c0..51ea1a9 100644
--- a/tests/libedata-cal/test-cal-meta-backend.c
+++ b/tests/libedata-cal/test-cal-meta-backend.c
@@ -2257,6 +2257,708 @@ test_receive_objects (ECalMetaBackend *meta_backend)
}
static void
+test_receive_and_remove (ECalMetaBackend *meta_backend)
+{
+ ECalMetaBackendTest *test_backend;
+ ECalCache *cal_cache;
+ gchar *calobj;
+ GSList *old_components = NULL, *new_components = NULL, *ids;
+ GError *error = NULL;
+
+ g_assert_nonnull (meta_backend);
+
+ test_backend = E_CAL_META_BACKEND_TEST (meta_backend);
+ cal_cache = e_cal_meta_backend_ref_cache (meta_backend);
+ g_assert_nonnull (cal_cache);
+
+ /* Receive master component */
+ calobj = tcu_new_icalstring_from_test_case ("invite-5");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 1);
+ g_assert_cmpint (test_backend->save_count, ==, 1);
+ g_assert_cmpint (test_backend->remove_count, ==, 0);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ calobj = NULL;
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->get_object_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, "invite-detached", NULL, &calobj, &error);
+ g_assert_no_error (error);
+ g_assert_nonnull (calobj);
+ g_assert_nonnull (strstr (calobj, "SUMMARY:Recurring invite\r\n"));
+ g_assert_null (strstr (calobj, "SUMMARY:Detached instance of recurring invite\r\n"));
+ g_free (calobj);
+
+ /* Delete master component, with no detached instances now */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", NULL));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_ALL, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 1);
+ g_assert_cmpint (test_backend->save_count, ==, 1);
+ g_assert_cmpint (test_backend->remove_count, ==, 1);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive the master component again */
+ calobj = tcu_new_icalstring_from_test_case ("invite-5");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 2);
+ g_assert_cmpint (test_backend->save_count, ==, 2);
+ g_assert_cmpint (test_backend->remove_count, ==, 1);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Then receive the detached instance */
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 3);
+ g_assert_cmpint (test_backend->save_count, ==, 3);
+ g_assert_cmpint (test_backend->remove_count, ==, 1);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ calobj = NULL;
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->get_object_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, "invite-detached", NULL, &calobj, &error);
+ g_assert_no_error (error);
+ g_assert_nonnull (calobj);
+ g_assert_nonnull (strstr (calobj, "SUMMARY:Recurring invite\r\n"));
+ g_assert_nonnull (strstr (calobj, "SUMMARY:Detached instance of recurring invite\r\n"));
+ g_free (calobj);
+
+ /* Remove only the detached instance */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180502T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_THIS, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_nonnull (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 4);
+ g_assert_cmpint (test_backend->save_count, ==, 4);
+ g_assert_cmpint (test_backend->remove_count, ==, 1);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free_full (new_components, g_object_unref);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ calobj = NULL;
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->get_object_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, "invite-detached", NULL, &calobj, &error);
+ g_assert_no_error (error);
+ g_assert_nonnull (calobj);
+ g_assert_nonnull (strstr (calobj, "SUMMARY:Recurring invite\r\n"));
+ g_assert_null (strstr (calobj, "SUMMARY:Detached instance of recurring invite\r\n"));
+ g_free (calobj);
+
+ /* Receive the detached instance again */
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 5);
+ g_assert_cmpint (test_backend->save_count, ==, 5);
+ g_assert_cmpint (test_backend->remove_count, ==, 1);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ calobj = NULL;
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->get_object_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, "invite-detached", NULL, &calobj, &error);
+ g_assert_no_error (error);
+ g_assert_nonnull (calobj);
+ g_assert_nonnull (strstr (calobj, "SUMMARY:Recurring invite\r\n"));
+ g_assert_nonnull (strstr (calobj, "SUMMARY:Detached instance of recurring invite\r\n"));
+ g_free (calobj);
+
+ /* Remove the master object, which should delete both */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", NULL));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_ALL, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 5);
+ g_assert_cmpint (test_backend->save_count, ==, 5);
+ g_assert_cmpint (test_backend->remove_count, ==, 2);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ calobj = NULL;
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->get_object_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, "invite-detached", NULL, &calobj, &error);
+ g_assert_error (error, E_DATA_CAL_ERROR, ObjectNotFound);
+ g_assert_null (calobj);
+ g_clear_error (&error);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->get_object_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, "invite-detached", "20180502T000000Z", &calobj, &error);
+ g_assert_error (error, E_DATA_CAL_ERROR, ObjectNotFound);
+ g_assert_null (calobj);
+ g_clear_error (&error);
+
+ /* Receive only the detached instance, with no master object in the cache */
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 8);
+ g_assert_cmpint (test_backend->save_count, ==, 6);
+ g_assert_cmpint (test_backend->remove_count, ==, 2);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ /* Remove the master object with mode THIS, which is not in the cache, but should remove all anyway */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", NULL));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_THIS, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 8);
+ g_assert_cmpint (test_backend->save_count, ==, 6);
+ g_assert_cmpint (test_backend->remove_count, ==, 3);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ /* Remove the master object with mode ALL, which is not in the cache, but should remove all */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", NULL));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_ALL, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 9);
+ g_assert_cmpint (test_backend->save_count, ==, 7);
+ g_assert_cmpint (test_backend->remove_count, ==, 4);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive only the detached instance, with no master object in the cache */
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 10);
+ g_assert_cmpint (test_backend->save_count, ==, 8);
+ g_assert_cmpint (test_backend->remove_count, ==, 4);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ /* Remove the detached instance with mode THIS */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180502T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_THIS, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 10);
+ g_assert_cmpint (test_backend->save_count, ==, 8);
+ g_assert_cmpint (test_backend->remove_count, ==, 5);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive only the detached instance, with no master object in the cache */
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 11);
+ g_assert_cmpint (test_backend->save_count, ==, 9);
+ g_assert_cmpint (test_backend->remove_count, ==, 5);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ /* Remove the detached instance with mode ALL */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180502T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_ALL, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 11);
+ g_assert_cmpint (test_backend->save_count, ==, 9);
+ g_assert_cmpint (test_backend->remove_count, ==, 6);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive only two detached instances, with no master object in the cache */
+ calobj = tcu_new_icalstring_from_test_case ("invite-7");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 13);
+ g_assert_cmpint (test_backend->save_count, ==, 11);
+ g_assert_cmpint (test_backend->remove_count, ==, 6);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ /* Remove the detached instance with mode THIS */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180502T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_THIS, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 14);
+ g_assert_cmpint (test_backend->save_count, ==, 12);
+ g_assert_cmpint (test_backend->remove_count, ==, 6);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive the removed component again */
+ calobj = tcu_new_icalstring_from_test_case ("invite-6");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ /* Remove both detached instances with mode THIS */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180502T000000Z"));
+ ids = g_slist_prepend (ids, e_cal_component_id_new ("invite-detached", "20180509T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_THIS, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 2);
+ g_assert_cmpint (g_slist_length (new_components), ==, 2);
+ g_assert_null (new_components->data);
+ g_assert_null (new_components->next->data);
+ g_assert_cmpint (test_backend->load_count, ==, 16);
+ g_assert_cmpint (test_backend->save_count, ==, 14);
+ g_assert_cmpint (test_backend->remove_count, ==, 7);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive only two detached instances, with no master object in the cache */
+ calobj = tcu_new_icalstring_from_test_case ("invite-7");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 18);
+ g_assert_cmpint (test_backend->save_count, ==, 16);
+ g_assert_cmpint (test_backend->remove_count, ==, 7);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ /* Remove the second detached instance with mode ALL */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180509T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_ALL, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 18);
+ g_assert_cmpint (test_backend->save_count, ==, 16);
+ g_assert_cmpint (test_backend->remove_count, ==, 8);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive only two detached instances, with no master object in the cache */
+ calobj = tcu_new_icalstring_from_test_case ("invite-7");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 20);
+ g_assert_cmpint (test_backend->save_count, ==, 18);
+ g_assert_cmpint (test_backend->remove_count, ==, 8);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", NULL,
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Receive the master object */
+ calobj = tcu_new_icalstring_from_test_case ("invite-5");
+ g_assert_nonnull (calobj);
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->receive_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, calobj, &error);
+ g_assert_no_error (error);
+ g_free (calobj);
+
+ g_assert_cmpint (test_backend->load_count, ==, 21);
+ g_assert_cmpint (test_backend->save_count, ==, 19);
+ g_assert_cmpint (test_backend->remove_count, ==, 8);
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Remove the second detached instance with mode THIS */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180509T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_THIS, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_nonnull (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 22);
+ g_assert_cmpint (test_backend->save_count, ==, 20);
+ g_assert_cmpint (test_backend->remove_count, ==, 8);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free_full (new_components, g_object_unref);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, FALSE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, FALSE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ /* Remove the first detached instance with mode ALL, which will drop whole series */
+ ids = g_slist_prepend (NULL, e_cal_component_id_new ("invite-detached", "20180502T000000Z"));
+
+ E_CAL_BACKEND_SYNC_GET_CLASS (meta_backend)->remove_objects_sync (E_CAL_BACKEND_SYNC (meta_backend),
+ NULL, NULL, ids, E_CAL_OBJ_MOD_ALL, &old_components, &new_components, &error);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_slist_length (old_components), ==, 1);
+ g_assert_cmpint (g_slist_length (new_components), ==, 1);
+ g_assert_null (new_components->data);
+ g_assert_cmpint (test_backend->load_count, ==, 22);
+ g_assert_cmpint (test_backend->save_count, ==, 20);
+ g_assert_cmpint (test_backend->remove_count, ==, 9);
+
+ g_slist_free_full (old_components, g_object_unref);
+ g_slist_free (new_components);
+ g_slist_free_full (ids, (GDestroyNotify) e_cal_component_free_id);
+ old_components = NULL;
+ new_components = NULL;
+
+ ecmb_test_vcalendar_contains (test_backend->vcalendar, TRUE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+ ecmb_test_cache_contains (cal_cache, TRUE, FALSE,
+ "invite-detached", NULL,
+ "invite-detached", "20180502T000000Z",
+ "invite-detached", "20180509T000000Z",
+ NULL);
+
+ ecmb_test_cache_and_server_equal (cal_cache, test_backend->vcalendar, E_CACHE_INCLUDE_DELETED);
+
+ g_object_unref (cal_cache);
+}
+
+static void
test_get_object (ECalMetaBackend *meta_backend)
{
ECalMetaBackendTest *test_backend;
@@ -2670,6 +3372,7 @@ main_loop_wrapper (test_create_objects)
main_loop_wrapper (test_modify_objects)
main_loop_wrapper (test_remove_objects)
main_loop_wrapper (test_receive_objects)
+main_loop_wrapper (test_receive_and_remove)
main_loop_wrapper (test_get_object)
main_loop_wrapper (test_get_object_list)
main_loop_wrapper (test_refresh)
@@ -2734,6 +3437,8 @@ main (gint argc,
tcu_fixture_setup, test_remove_objects_tcu, tcu_fixture_teardown);
g_test_add ("/ECalMetaBackend/ReceiveObjects", TCUFixture, &closure_events,
tcu_fixture_setup, test_receive_objects_tcu, tcu_fixture_teardown);
+ g_test_add ("/ECalMetaBackend/ReceiveAndRemove", TCUFixture, &closure_events,
+ tcu_fixture_setup, test_receive_and_remove_tcu, tcu_fixture_teardown);
g_test_add ("/ECalMetaBackend/GetObject", TCUFixture, &closure_events,
tcu_fixture_setup, test_get_object_tcu, tcu_fixture_teardown);
g_test_add ("/ECalMetaBackend/GetObjectList", TCUFixture, &closure_events,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]