[telepathy-logger-0.8] telepathy-logger: tests: Add new TpLogger logs that don't parse as XML

Debarshi Ray debarshir at kemper.freedesktop.org
Tue Apr 28 09:50:11 PDT 2015


Module: telepathy-logger
Branch: telepathy-logger-0.8
Commit: f5c811681120fa8f7fcc1b4fa3cdb9fa655b800a
URL:    http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=f5c811681120fa8f7fcc1b4fa3cdb9fa655b800a

Author: Debarshi Ray <debarshir at freedesktop.org>
Date:   Mon Apr 20 11:13:44 2015 +0200

tests: Add new TpLogger logs that don't parse as XML

This is meant to flex the error handling code paths.

https://bugs.freedesktop.org/show_bug.cgi?id=40675
https://bugs.freedesktop.org/show_bug.cgi?id=89595
(cherry picked from commit 89ad4c941816b7b09c20c7111086d965d87861e7)

---

 tests/dbus/test-log-manager.c                                    |    2 +-
 tests/dbus/test-tpl-log-store-xml.c                              |    2 +-
 .../user6 at collabora.co.uk/20140101.log                           |    6 ++++++
 .../user6 at collabora.co.uk/20140102.log                           |    6 ++++++
 .../user6 at collabora.co.uk/20140103.log                           |    5 +++++
 5 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c
index 3137931..f4f5d29 100644
--- a/tests/dbus/test-log-manager.c
+++ b/tests/dbus/test-log-manager.c
@@ -457,7 +457,7 @@ test_get_entities (TestCaseFixture *fixture,
       get_entities_cb, fixture);
   g_main_loop_run (fixture->main_loop);
 
-  g_assert_cmpint (g_list_length (fixture->ret), ==, 5);
+  g_assert_cmpint (g_list_length (fixture->ret), ==, 6);
 
   /* we do not want duplicates */
   fixture->ret = g_list_sort (fixture->ret, (GCompareFunc) _tpl_entity_compare);
diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c
index 35e3178..b9693a6 100644
--- a/tests/dbus/test-tpl-log-store-xml.c
+++ b/tests/dbus/test-tpl-log-store-xml.c
@@ -119,7 +119,7 @@ test_clear (XmlTestCaseFixture *fixture,
       TPL_EVENT_MASK_TEXT);
 
   g_assert (hits != NULL);
-  g_assert_cmpint (g_list_length (hits), ==, 4);
+  g_assert_cmpint (g_list_length (hits), ==, 5);
 
   tpl_log_manager_search_free (hits);
 
diff --git a/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140101.log b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140101.log
new file mode 100644
index 0000000..26a149c
--- /dev/null
+++ b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140101.log
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?xml-stylesheet type="text/xsl" href="log-store-xml.xsl"?>
+<log>
+<message time='20140101T09:26:07' cm_id='456' id='user6 at collabora.co.uk' name='User6' token='' isuser='false' type='normal'>1</message>
+<message time='20140101T09:27:20' cm_id='456' id='user6 at collabora.co.uk' name='User6' token='' isuser='false' type='normal'>2</message>
+</log>
diff --git a/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140102.log b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140102.log
new file mode 100644
index 0000000..5cd55b8
--- /dev/null
+++ b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140102.log
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?xml-stylesheet type="text/xsl" href="log-store-xml.xsl"?>
+<log>
+<message time='20140102T16:27:50' cm_id='456' id='user6 at collabora.co.uk' name='User6' token='' isuser='false' type='normal'>&#x8;</message>
+<message time='20140102T16:27:51' cm_id='456' id='user6 at collabora.co.uk' name='User6' token='' isuser='false' type='normal'>3&#x8;4</message>
+</log>
diff --git a/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140103.log b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140103.log
new file mode 100644
index 0000000..80a9e6c
--- /dev/null
+++ b/tests/logs/TpLogger/logs/gabble_jabber_user_40collabora_2eco_2euk/user6 at collabora.co.uk/20140103.log
@@ -0,0 +1,5 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?xml-stylesheet type="text/xsl" href="log-store-xml.xsl"?>
+<log>
+<message time='20140103T09:26:07' cm_id='456' id='user at collabora.co.uk' name='User1' token='' isuser='false' type='normal'>5</message>
+</log>



More information about the telepathy-commits mailing list