| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (tests services lightdm)
|
| 20 | #:use-module (guix diagnostics)
|
| 21 | #:use-module (gnu services lightdm)
|
| 22 | #:use-module (srfi srfi-64))
|
| 23 |
|
| 24 | |
| 25 |
|
| 26 | |
| 27 | (define validate-lightdm-configuration (@@ (gnu services lightdm)
|
| 28 | validate-lightdm-configuration))
|
| 29 |
|
| 30 | (test-begin "lightdm-service")
|
| 31 |
|
| 32 | (test-equal "error on missing greeter"
|
| 33 | 'ok
|
| 34 | (catch 'quit
|
| 35 | (lambda ()
|
| 36 | (validate-lightdm-configuration (lightdm-configuration (greeters '()))))
|
| 37 | (lambda _
|
| 38 | 'ok)))
|
| 39 |
|
| 40 | (test-equal "error when a greeter has multiple configurations"
|
| 41 | 'ok
|
| 42 | (catch 'quit
|
| 43 | (lambda ()
|
| 44 | (lightdm-configuration
|
| 45 | (greeters (list (lightdm-gtk-greeter-configuration
|
| 46 | (theme-name "boring"))
|
| 47 | (lightdm-gtk-greeter-configuration
|
| 48 | (theme-name "blue"))))))
|
| 49 | (lambda _
|
| 50 | 'ok)))
|
| 51 |
|
| 52 | (test-end "lightdm-service")
|