[evolution-kolab/ek-wip-porting: 8/8] test-kolab-mail-access: added folder creation/deletion into test run
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/ek-wip-porting: 8/8] test-kolab-mail-access: added folder creation/deletion into test run
- Date: Fri, 31 Aug 2012 16:11:24 +0000 (UTC)
commit fac8e0ff12f2140b98fb70d11cbcb13e932296b7
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Fri Aug 31 17:50:36 2012 +0200
test-kolab-mail-access: added folder creation/deletion into test run
.../integration/libekolab/test-kolab-mail-access.c | 37 ++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/src/tests/integration/libekolab/test-kolab-mail-access.c b/src/tests/integration/libekolab/test-kolab-mail-access.c
index 65f8bd7..d2c8351 100644
--- a/src/tests/integration/libekolab/test-kolab-mail-access.c
+++ b/src/tests/integration/libekolab/test-kolab-mail-access.c
@@ -52,6 +52,8 @@
#define AUTH "auth"
#define SECURITY "security"
+#define TESTFOLDERNAME "INBOX/__test_kolab_mail_access_create_delete_source"
+
/*----------------------------------------------------------------------------*/
static gboolean
@@ -295,6 +297,35 @@ test_kolab_mail_access_query_folder_info (KolabMailAccess *kmailaccess,
}
static gboolean
+test_kolab_mail_access_create_delete_source (KolabMailAccess *kmailaccess,
+ GError **err)
+{
+ GError *tmp_err = NULL;
+ gboolean ok = NULL;
+
+ ok = kolab_mail_access_create_source (kmailaccess,
+ TESTFOLDERNAME,
+ KOLAB_FOLDER_TYPE_EMAIL,
+ NULL,
+ &tmp_err);
+ if (! ok) {
+ g_propagate_error (err, tmp_err);
+ return FALSE;
+ }
+
+ ok = kolab_mail_access_delete_source (kmailaccess,
+ TESTFOLDERNAME,
+ NULL,
+ &tmp_err);
+ if (! ok) {
+ g_propagate_error (err, tmp_err);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
test_kolab_mail_access (KolabFolderContextID context)
{
KolabMailAccess *kmailaccess = NULL;
@@ -360,6 +391,12 @@ test_kolab_mail_access (KolabFolderContextID context)
&tmp_err);
if (! ok)
goto test_part_cleanup;
+
+ /* test folder creation and deletion */
+ ok = test_kolab_mail_access_create_delete_source (kmailaccess,
+ &tmp_err);
+ if (! ok)
+ goto test_part_cleanup;
/* synchronize metadata and caches with server */
ok = kolab_mail_access_synchronize (kmailaccess,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]