summaryrefslogtreecommitdiff
path: root/tests/services
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-07-06 14:25:14 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-07-07 10:43:08 -0400
commit258bc4c4e668e9817471d04d052bc0a8e2d43fa0 (patch)
tree0186cc63f69c1216657a53869ea69a4ea614f0b6 /tests/services
parentba86c7604d7d99f6c998f58365e3eb75c08d461c (diff)
tests: telephony: Remove obsolete parsing tests.
Fixes <https://issues.guix.gnu.org/56343>. * tests/services/telephony.scm (parse-dbus-reply, parse-account-ids) (parse-account-details, parse-contacts, getAccountList-reply): Delete procedures. ("parse-account-ids"): Delete test. (getAccountDetails-reply): Delete procedure. ("parse-account-details; username, alias and display name"): Delete test. (getContacts-reply): Delete procedure. ("parse-account-contacts"): Delete test. (getContacts-empty-reply): Delete procedure. ("parse-account-contacts, empty array"): Delete test. Reported-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/services')
-rw-r--r--tests/services/telephony.scm391
1 files changed, 0 insertions, 391 deletions
diff --git a/tests/services/telephony.scm b/tests/services/telephony.scm
index b4a0f120d4a..52c2a63cd6d 100644
--- a/tests/services/telephony.scm
+++ b/tests/services/telephony.scm
@@ -25,400 +25,9 @@
25 25
26(test-begin "jami-service") 26(test-begin "jami-service")
27 27
28(define parse-dbus-reply
29 (@@ (gnu build jami-service) parse-dbus-reply))
30
31(define parse-account-ids
32 (@@ (gnu build jami-service) parse-account-ids))
33
34(define parse-account-details
35 (@@ (gnu build jami-service) parse-account-details))
36
37(define parse-contacts
38 (@@ (gnu build jami-service) parse-contacts))
39
40(define jami-account->alist 28(define jami-account->alist
41 (@@ (gnu services telephony) jami-account->alist)) 29 (@@ (gnu services telephony) jami-account->alist))
42 30
43;; $ dbus-send --print-reply --dest="cx.ring.Ring" \
44;; "/cx/ring/Ring/ConfigurationManager" \
45;; "cx.ring.Ring.ConfigurationManager.getAccountList"
46(define getAccountList-reply "\
47method return time=1622217253.386711 sender=:1.7 -> destination=:1.14 serial=140 reply_serial=2
48 array [
49 string \"addf37fbb558d6a0\"
50 string \"d5cbeb7d08c98a65\"
51 string \"398af0c6b74ce101\"
52 ]
53")
54
55(test-equal "parse-account-ids"
56 '("addf37fbb558d6a0" "d5cbeb7d08c98a65" "398af0c6b74ce101")
57 (parse-account-ids getAccountList-reply))
58
59;; $ dbus-send --print-reply --dest="cx.ring.Ring" \
60;; "/cx/ring/Ring/ConfigurationManager" \
61;; "cx.ring.Ring.ConfigurationManager.getAccountDetails" \
62;; 'string:398af0c6b74ce101'
63(define getAccountDetails-reply "\
64method return time=1622254991.789588 sender=:1.7 -> destination=:1.19 serial=145 reply_serial=2
65 array [
66 dict entry(
67 string \"Account.accountDiscovery\"
68 string \"false\"
69 )
70 dict entry(
71 string \"Account.accountPublish\"
72 string \"false\"
73 )
74 dict entry(
75 string \"Account.activeCallLimit\"
76 string \"-1\"
77 )
78 dict entry(
79 string \"Account.alias\"
80 string \"some-rendezvous-point-name\"
81 )
82 dict entry(
83 string \"Account.allModeratorEnabled\"
84 string \"true\"
85 )
86 dict entry(
87 string \"Account.allowCertFromContact\"
88 string \"true\"
89 )
90 dict entry(
91 string \"Account.allowCertFromHistory\"
92 string \"true\"
93 )
94 dict entry(
95 string \"Account.allowCertFromTrusted\"
96 string \"true\"
97 )
98 dict entry(
99 string \"Account.archiveHasPassword\"
100 string \"false\"
101 )
102 dict entry(
103 string \"Account.audioPortMax\"
104 string \"32766\"
105 )
106 dict entry(
107 string \"Account.audioPortMin\"
108 string \"16384\"
109 )
110 dict entry(
111 string \"Account.autoAnswer\"
112 string \"false\"
113 )
114 dict entry(
115 string \"Account.defaultModerators\"
116 string \"\"
117 )
118 dict entry(
119 string \"Account.deviceID\"
120 string \"94b4070fc7a8afa8482c777a9822c52e6af2e1bd\"
121 )
122 dict entry(
123 string \"Account.deviceName\"
124 string \"some-device\"
125 )
126 dict entry(
127 string \"Account.dhtProxyListUrl\"
128 string \"https://config.jami.net/proxyList\"
129 )
130 dict entry(
131 string \"Account.displayName\"
132 string \"some-rendezvous-point-name\"
133 )
134 dict entry(
135 string \"Account.dtmfType\"
136 string \"overrtp\"
137 )
138 dict entry(
139 string \"Account.enable\"
140 string \"true\"
141 )
142 dict entry(
143 string \"Account.hasCustomUserAgent\"
144 string \"false\"
145 )
146 dict entry(
147 string \"Account.hostname\"
148 string \"bootstrap.jami.net\"
149 )
150 dict entry(
151 string \"Account.localInterface\"
152 string \"default\"
153 )
154 dict entry(
155 string \"Account.localModeratorsEnabled\"
156 string \"true\"
157 )
158 dict entry(
159 string \"Account.mailbox\"
160 string \"\"
161 )
162 dict entry(
163 string \"Account.managerUri\"
164 string \"\"
165 )
166 dict entry(
167 string \"Account.managerUsername\"
168 string \"\"
169 )
170 dict entry(
171 string \"Account.peerDiscovery\"
172 string \"false\"
173 )
174 dict entry(
175 string \"Account.presenceSubscribeSupported\"
176 string \"true\"
177 )
178 dict entry(
179 string \"Account.proxyEnabled\"
180 string \"false\"
181 )
182 dict entry(
183 string \"Account.proxyPushToken\"
184 string \"\"
185 )
186 dict entry(
187 string \"Account.proxyServer\"
188 string \"dhtproxy.jami.net:[80-95]\"
189 )
190 dict entry(
191 string \"Account.publishedAddress\"
192 string \"\"
193 )
194 dict entry(
195 string \"Account.publishedPort\"
196 string \"5060\"
197 )
198 dict entry(
199 string \"Account.publishedSameAsLocal\"
200 string \"true\"
201 )
202 dict entry(
203 string \"Account.rendezVous\"
204 string \"true\"
205 )
206 dict entry(
207 string \"Account.ringtoneEnabled\"
208 string \"true\"
209 )
210 dict entry(
211 string \"Account.ringtonePath\"
212 string \"/usr/share/ring/ringtones/default.opus\"
213 )
214 dict entry(
215 string \"Account.type\"
216 string \"RING\"
217 )
218 dict entry(
219 string \"Account.upnpEnabled\"
220 string \"true\"
221 )
222 dict entry(
223 string \"Account.useragent\"
224 string \"\"
225 )
226 dict entry(
227 string \"Account.username\"
228 string \"ccb8bbe2382343f7feb140710ab48aaf1b55634e\"
229 )
230 dict entry(
231 string \"Account.videoEnabled\"
232 string \"true\"
233 )
234 dict entry(
235 string \"Account.videoPortMax\"
236 string \"65534\"
237 )
238 dict entry(
239 string \"Account.videoPortMin\"
240 string \"49152\"
241 )
242 dict entry(
243 string \"DHT.PublicInCalls\"
244 string \"true\"
245 )
246 dict entry(
247 string \"DHT.port\"
248 string \"7766\"
249 )
250 dict entry(
251 string \"RingNS.account\"
252 string \"3989b55313a911b6f0c004748b49b254f35c9ef6\"
253 )
254 dict entry(
255 string \"RingNS.uri\"
256 string \"\"
257 )
258 dict entry(
259 string \"SRTP.enable\"
260 string \"true\"
261 )
262 dict entry(
263 string \"SRTP.keyExchange\"
264 string \"sdes\"
265 )
266 dict entry(
267 string \"SRTP.rtpFallback\"
268 string \"false\"
269 )
270 dict entry(
271 string \"STUN.enable\"
272 string \"false\"
273 )
274 dict entry(
275 string \"STUN.server\"
276 string \"\"
277 )
278 dict entry(
279 string \"TLS.certificateFile\"
280 string \"/var/lib/jami/.local/share/jami/398af0c6b74ce101/ring_device.crt\"
281 )
282 dict entry(
283 string \"TLS.certificateListFile\"
284 string \"\"
285 )
286 dict entry(
287 string \"TLS.ciphers\"
288 string \"\"
289 )
290 dict entry(
291 string \"TLS.method\"
292 string \"Automatic\"
293 )
294 dict entry(
295 string \"TLS.negotiationTimeoutSec\"
296 string \"-1\"
297 )
298 dict entry(
299 string \"TLS.password\"
300 string \"\"
301 )
302 dict entry(
303 string \"TLS.privateKeyFile\"
304 string \"/var/lib/jami/.local/share/jami/398af0c6b74ce101/ring_device.key\"
305 )
306 dict entry(
307 string \"TLS.requireClientCertificate\"
308 string \"true\"
309 )
310 dict entry(
311 string \"TLS.serverName\"
312 string \"\"
313 )
314 dict entry(
315 string \"TLS.verifyClient\"
316 string \"true\"
317 )
318 dict entry(
319 string \"TLS.verifyServer\"
320 string \"true\"
321 )
322 dict entry(
323 string \"TURN.enable\"
324 string \"true\"
325 )
326 dict entry(
327 string \"TURN.password\"
328 string \"ring\"
329 )
330 dict entry(
331 string \"TURN.realm\"
332 string \"ring\"
333 )
334 dict entry(
335 string \"TURN.server\"
336 string \"turn.jami.net\"
337 )
338 dict entry(
339 string \"TURN.username\"
340 string \"ring\"
341 )
342 ]
343")
344
345(test-equal "parse-account-details; username, alias and display name"
346 '("ccb8bbe2382343f7feb140710ab48aaf1b55634e" ;username
347 "some-rendezvous-point-name" ;alias
348 "some-rendezvous-point-name") ;displayName
349 (let ((account-details (parse-account-details getAccountDetails-reply)))
350 (list (assoc-ref account-details "Account.username")
351 (assoc-ref account-details "Account.alias")
352 (assoc-ref account-details "Account.displayName"))))
353
354(define getContacts-reply "\
355method return time=1627014042.752673 sender=:1.113 -> destination=:1.186 serial=220 reply_serial=2
356 array [
357 array [
358 dict entry(
359 string \"added\"
360 string \"1578883327\"
361 )
362 dict entry(
363 string \"confirmed\"
364 string \"true\"
365 )
366 dict entry(
367 string \"id\"
368 string \"1c7d5a09464223442549fef172a3cf6f4de9b01c\"
369 )
370 ]
371 array [
372 dict entry(
373 string \"added\"
374 string \"1623107941\"
375 )
376 dict entry(
377 string \"confirmed\"
378 string \"true\"
379 )
380 dict entry(
381 string \"id\"
382 string \"5903c6c9ac5cb863c64e559add3d5d1c8c563449\"
383 )
384 ]
385 array [
386 dict entry(
387 string \"added\"
388 string \"1595996256\"
389 )
390 dict entry(
391 string \"confirmed\"
392 string \"true\"
393 )
394 dict entry(
395 string \"id\"
396 string \"ff2d72a548693214fb3a0f0f7a943b5e2bb9be03\"
397 )
398 ]
399 ]")
400
401(test-equal "parse-account-contacts"
402 '((("added" . "1578883327")
403 ("confirmed" . "true")
404 ("id" . "1c7d5a09464223442549fef172a3cf6f4de9b01c"))
405 (("added" . "1623107941")
406 ("confirmed" . "true")
407 ("id" . "5903c6c9ac5cb863c64e559add3d5d1c8c563449"))
408 (("added" . "1595996256")
409 ("confirmed" . "true")
410 ("id" . "ff2d72a548693214fb3a0f0f7a943b5e2bb9be03")))
411 (parse-contacts getContacts-reply))
412
413(define getContacts-empty-reply "\
414method return time=1627400787.873988 sender=:1.1197 -> destination=:1.1463 serial=2127 reply_serial=2
415 array [
416 ]")
417
418(test-equal "parse-account-contacts, empty array"
419 '()
420 (parse-contacts getContacts-empty-reply))
421
422(define %dummy-jami-account (jami-account 31(define %dummy-jami-account (jami-account
423 (archive "/tmp/dummy.gz"))) 32 (archive "/tmp/dummy.gz")))
424 33