Bug 69618

Summary: Gabble: reduce Telepathy 0.x dependency in regression tests
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: gabbleAssignee: Simon McVittie <smcv>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 01/10] placate coding-style check
02/10] Tests: replace GetSelfHandle calls with property-getting
03/10] Avoid calling Group.GetSelfHandle()
04/10] constants: factor out PREFIX
05/10] tests: use constants instead of o.fd.T
06/10] Add inspect_contact_sync, inspect_contacts_sync and use in simple cases
07/10] groups-12792 test: remove unused function
08/10] MUC tests: modernize a bit
09/10] muc/roomlist.py: stop testing pre-Requests API
10/10] Add get_contact_handle_sync, get_contact_handles_sync; use in simple cases

Description Simon McVittie 2013-09-20 16:33:05 UTC
Gabble is going to be pretty annoying to port to 'next' but we can at least get a head start on the tests.
Comment 1 Simon McVittie 2013-09-20 16:33:50 UTC
Created attachment 86201 [details] [review]
01/10] placate coding-style check
Comment 2 Simon McVittie 2013-09-20 16:34:06 UTC
Created attachment 86202 [details] [review]
02/10] Tests: replace GetSelfHandle calls with  property-getting

sed expression:

    s/\.GetSelfHandle()/.Properties.Get(cs.CONN, "SelfHandle")/g

adjusted by hand to exclude Group.GetSelfHandle() calls.
Comment 3 Simon McVittie 2013-09-20 16:34:18 UTC
Created attachment 86203 [details] [review]
03/10] Avoid calling Group.GetSelfHandle()
Comment 4 Simon McVittie 2013-09-20 16:34:46 UTC
Created attachment 86204 [details] [review]
04/10] constants: factor out PREFIX

This will mean we can switch over to im.telepathy1 more easily.

---

I'd like to get this into all the CMs at some point.
Comment 5 Simon McVittie 2013-09-20 16:34:56 UTC
Created attachment 86205 [details] [review]
05/10] tests: use constants instead of o.fd.T
Comment 6 Simon McVittie 2013-09-20 16:35:11 UTC
Created attachment 86206 [details] [review]
06/10] Add inspect_contact_sync, inspect_contacts_sync and use  in simple cases

Telepathy 1.0 doesn't have InspectHandles.
Comment 7 Simon McVittie 2013-09-20 16:35:22 UTC
Created attachment 86207 [details] [review]
07/10] groups-12792 test: remove unused function
Comment 8 Simon McVittie 2013-09-20 16:35:38 UTC
Created attachment 86208 [details] [review]
08/10] MUC tests: modernize a bit

We're better off using MembersChangedDetailed, which maps 1:1 into
MembersChanged in Telepathy 1.0.

Telepathy 1.0 no longer has RequestHandles, so cut out the middle-man
and request MUC channels by TargetID.

Hard-coding that the first two contacts we see are handles 2 and 3
is just horrible - let's not do that.
Comment 9 Simon McVittie 2013-09-20 16:35:58 UTC
Created attachment 86209 [details] [review]
09/10] muc/roomlist.py: stop testing pre-Requests API

We have equivalent test coverage for CreateChannel().

Also stop listening for the NewChannel signal.
Comment 10 Simon McVittie 2013-09-20 16:36:10 UTC
Created attachment 86210 [details] [review]
10/10] Add get_contact_handle_sync, get_contact_handles_sync;  use in simple cases
Comment 11 Simon McVittie 2013-09-20 16:44:02 UTC
I'm probably going to concentrate on Haze or MC after these, so someone else is welcome to pick up the (large!) Gabble job.
Comment 12 Guillaume Desmottes 2013-09-23 08:41:16 UTC
Comment on attachment 86201 [details] [review]
01/10] placate coding-style check

Review of attachment 86201 [details] [review]:
-----------------------------------------------------------------

++ (sorry)
Comment 13 Guillaume Desmottes 2013-09-23 08:41:31 UTC
Comment on attachment 86202 [details] [review]
02/10] Tests: replace GetSelfHandle calls with  property-getting

Review of attachment 86202 [details] [review]:
-----------------------------------------------------------------

++
Comment 14 Guillaume Desmottes 2013-09-23 08:41:55 UTC
Comment on attachment 86203 [details] [review]
03/10] Avoid calling Group.GetSelfHandle()

Review of attachment 86203 [details] [review]:
-----------------------------------------------------------------

++
Comment 15 Guillaume Desmottes 2013-09-23 08:42:11 UTC
Comment on attachment 86204 [details] [review]
04/10] constants: factor out PREFIX

Review of attachment 86204 [details] [review]:
-----------------------------------------------------------------

++
Comment 16 Guillaume Desmottes 2013-09-23 08:42:28 UTC
Comment on attachment 86205 [details] [review]
05/10] tests: use constants instead of o.fd.T

Review of attachment 86205 [details] [review]:
-----------------------------------------------------------------

++
Comment 17 Guillaume Desmottes 2013-09-23 08:43:25 UTC
Comment on attachment 86206 [details] [review]
06/10] Add inspect_contact_sync, inspect_contacts_sync and use  in simple cases

Review of attachment 86206 [details] [review]:
-----------------------------------------------------------------

++
Comment 18 Guillaume Desmottes 2013-09-23 08:43:37 UTC
Comment on attachment 86207 [details] [review]
07/10] groups-12792 test: remove unused function

Review of attachment 86207 [details] [review]:
-----------------------------------------------------------------

++
Comment 19 Guillaume Desmottes 2013-09-23 08:44:05 UTC
Comment on attachment 86208 [details] [review]
08/10] MUC tests: modernize a bit

Review of attachment 86208 [details] [review]:
-----------------------------------------------------------------

++
Comment 20 Guillaume Desmottes 2013-09-23 08:44:38 UTC
Comment on attachment 86209 [details] [review]
09/10] muc/roomlist.py: stop testing pre-Requests API

Review of attachment 86209 [details] [review]:
-----------------------------------------------------------------

++
Comment 21 Guillaume Desmottes 2013-09-23 08:44:59 UTC
Comment on attachment 86210 [details] [review]
10/10] Add get_contact_handle_sync, get_contact_handles_sync;  use in simple cases

Review of attachment 86210 [details] [review]:
-----------------------------------------------------------------

++
Comment 22 GitLab Migration User 2019-12-03 19:59:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/263.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.