| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (tests services telephony)
|
| 20 | #:use-module (gnu build jami-service)
|
| 21 | #:use-module (gnu services telephony)
|
| 22 | #:use-module (srfi srfi-64))
|
| 23 |
|
| 24 | |
| 25 |
|
| 26 | (test-begin "jami-service")
|
| 27 |
|
| 28 | (define jami-account->alist
|
| 29 | (@@ (gnu services telephony) jami-account->alist))
|
| 30 |
|
| 31 | (define %dummy-jami-account (jami-account
|
| 32 | (archive "/tmp/dummy.gz")))
|
| 33 |
|
| 34 | (define %dummy-jami-account-2 (jami-account
|
| 35 | (archive "/tmp/dummy.gz")
|
| 36 | (rendezvous-point? #t)
|
| 37 | (peer-discovery? #f)
|
| 38 | (bootstrap-hostnames '("bootstrap.me"
|
| 39 | "fallback.another.host"))
|
| 40 | (name-server-uri "https://my.name.server")))
|
| 41 |
|
| 42 | (test-equal "jami-account->alist, no account detail value set"
|
| 43 | '()
|
| 44 | (jami-account->alist %dummy-jami-account))
|
| 45 |
|
| 46 | (test-equal "jami-account->alist, with account detail values"
|
| 47 | '(("Account.hostname" . "bootstrap.me;fallback.another.host")
|
| 48 | ("Account.peerDiscovery" . "false")
|
| 49 | ("Account.rendezVous" . "true")
|
| 50 | ("RingNS.uri" . "https://my.name.server"))
|
| 51 | (sort (jami-account->alist %dummy-jami-account-2)
|
| 52 | (lambda (x y)
|
| 53 | (string<=? (car x) (car y)))))
|
| 54 |
|
| 55 | (test-end)
|