Commit Graph

16 Commits (16fddf17f5ba90cd1b3c203a5fd8ec5b652fddb7)

Author SHA1 Message Date
Ludovic Courtès e6b1a2248f
services: Log-in services now require "pam_loginuid".
Fixes <https://bugs.gnu.org/35553>.
Reported by Bruno Haible <bruno@clisp.org>.

* gnu/services/base.scm (login-pam-service): Pass #:login-uid? #t to
'unix-pam-service'.
* gnu/services/ssh.scm (lsh-pam-services, openssh-pam-services):
Likewise.
* gnu/services/xorg.scm (slim-pam-service): Likewise.
(gdm-pam-service): Likewise for "gdm-autologin" and "gdm-password".
* gnu/tests/base.scm (run-basic-test)["getlogin on tty1"]: New test.
* gnu/tests/ssh.scm (run-ssh-test): Add #:test-getlogin? parameter.
["getlogin"]: New test.
(%test-dropbear): Pass #:test-getlogin? #f.
2019-05-09 12:11:36 +02:00
Ludovic Courtès 39d7fdce45
services: dhcp-client: Deprecate 'dhcp-client-service' procedure.
* gnu/services/networking.scm (dhcp-client-service-type): Add default
value.
* gnu/system/examples/bare-bones.tmpl: Use (service
dhcp-client-service-type) instead of (dhcp-client-service).
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/tests/base.scm (%avahi-os): Likewise.
* gnu/tests/databases.scm (%memcached-os): Likewise.
(%mongodb-os): Likewise.
* gnu/tests/dict.scm (%dicod-os): Likewise.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
(%exim-os): Likewise.
(%dovecot-os): Likewise.
* gnu/tests/messaging.scm (run-xmpp-test): Likewise.
(run-bitlbee-test): Likewise.
* gnu/tests/monitoring.scm (%prometheus-node-exporter-os): Likewise.
* gnu/tests/networking.scm (%inetd-os): Likewise.
(run-iptables-test): Likewise.
* gnu/tests/nfs.scm (%base-os): Likewise.
* gnu/tests/rsync.scm (%rsync-os): Likewise.
* gnu/tests/ssh.scm (run-ssh-test): Likewise.
* gnu/tests/version-control.scm (%cgit-os): Likewise.
(%git-http-os): Likewise.
(%gitolite-os): Likewise.
* gnu/tests/virtualization.scm (%libvirt-os): Likewise.
* gnu/tests/web.scm (%httpd-os): Likewise.
(%nginx-os): Likewise.
(%varnish-os): Likewise.
(%php-fpm-os): Likewise.
(%hpcguix-web-os): Likewise.
(%tailon-os): Likewise.
* tests/guix-system.sh: Likewise.
* doc/guix.texi (Networking Services): Document
'dhcp-client-service-type' and remove 'dhcp-client-service'.
2018-10-18 01:12:22 +02:00
Clément Lassieur c24b15472b
tests: Honor the return value of 'start-service'.
Since commit dc7b3e5633, 'start-service' returns
the Shepherd's representation of the service as a sexp, and '#f' if the
service fails to start.  Also, it doesn't throw an exception when the service
fails to start, so relying on an exception instead of relying on its return
value is a false positive.

* gnu/tests/base.scm (run-nss-mdns-test): Split tests so to check the return
value of 'start-service'.
(run-mcron-test, run-nss-mdns-test): Use 'test-assert' with the return value
of 'start-service'.
* gnu/tests/admin.scm (run-tailon-test): Idem.
* gnu/tests/dict.scm (run-dicod-test): Idem.
* gnu/tests/mail.scm (run-opensmtpd-test, run-exim-test, run-dovecot-test):
Idem.
* gnu/tests/messaging.scm (run-xmpp-test, run-bitlbee-test): Idem.
* gnu/tests/nfs.scm (run-nfs-test): Idem.
* gnu/tests/rsync.scm (run-rsync-test): Idem.
* gnu/tests/ssh.scm (run-ssh-test): Idem.
* gnu/tests/version-control.scm (run-cgit-test, run-git-http-test): Idem.
* gnu/tests/web.scm (run-php-fpm-test): Idem.
2018-06-13 09:11:45 +02:00
Ludovic Courtès ff913cf514
tests: ssh: Use 'with-extensions'.
* gnu/tests/ssh.scm (run-ssh-test)[test]: Wrap body in
'with-extensions'.  Remove %load-path manipulation code.
2018-06-01 15:21:28 +02:00
Marius Bakke 5d7141cd28
tests: ssh: Make sure we can run executables from PATH.
* gnu/tests/ssh.scm (run-ssh-test): Add tests for running commands in system
and user profile.
2017-11-01 20:29:32 +01:00
Leo Famulari 6c1a317e29
Merge branch 'master' into core-updates 2017-07-23 03:42:12 -04:00
Ludovic Courtès 8b113790fa
tests: Use 'virtual-machine' records instead of monadic procedures.
* gnu/tests/base.scm (%test-basic-os): Use 'let*' instead of 'mlet*' and
'virtual-machine' instead of 'system-qemu-image/shared-store-script'.
(run-mcron-test): Likewise.
(run-nss-mdns-test): Likewise.
* gnu/tests/dict.scm (run-dicod-test): Likewise.
* gnu/tests/mail.scm (run-opensmtpd-test): Likewise.
(run-exim-test): Likewise.
* gnu/tests/messaging.scm (run-xmpp-test): Likewise.
* gnu/tests/networking.scm (run-inetd-test): Likewise.
* gnu/tests/nfs.scm (run-nfs-test): Likewise.
* gnu/tests/ssh.scm (run-ssh-test): Likewise.
* gnu/tests/web.scm (run-nginx-test): Likewise.
2017-07-20 11:57:13 +02:00
Ludovic Courtès 47ce813f7d
tests: ssh: Use 'guile-ssh'.
* gnu/tests/ssh.scm (run-ssh-test): Use GUILE-SSH instead of
GUILE2.0-SSH.
2017-07-18 22:38:03 +02:00
Ludovic Courtès 5fa7cc5335
marionette: Factorize 'wait-for-file'.
* gnu/build/marionette.scm (wait-for-file): New procedure.
* gnu/tests/base.scm (run-mcron-test)[test](wait-for-file): Remove.
Pass second argument in 'wait-for-file' calls.
* gnu/tests/ssh.scm (run-ssh-test)[test](wait-for-file): Remove.
Pass second argument in 'wait-for-file' calls.
* gnu/tests/messaging.scm (run-xmpp-test)[test](guest-wait-for-file):
Remove.
Use 'wait-for-file' instead, with second argument.
2017-06-12 23:34:14 +02:00
Ludovic Courtès 9d0c24d1be
tests: ssh: Use 'guile2.0-ssh'.
Fixes a regression introduced in 4d8806c3d6.

* gnu/tests/ssh.scm (run-ssh-test): Use GUILE2.0-SSH instead of GUILE-SSH.
2017-05-21 11:56:29 +02:00
Ludovic Courtès 892d9089a8
tests: Introduce 'simple-operating-system' and use it.
* gnu/tests.scm (%simple-os): New macro.
(simple-operating-system): New macro.
* gnu/tests/base.scm (%simple-os): Define using 'simple-operating-system'.
(%mcron-os): Use 'simple-operating-system'.
* gnu/tests/mail.scm (%opensmtpd-os): Likewise.
* gnu/tests/messaging.scm (%base-os, os-with-service): Remove.
(run-xmpp-test): Use 'simple-operating-system'.
* gnu/tests/networking.scm (%inetd-os): Likewise.
* gnu/tests/ssh.scm (%base-os, os-with-service): Remove.
(run-ssh-test): Use 'simple-operating-system'.
* gnu/tests/web.scm (%nginx-os): Likewise.
2017-04-01 00:45:18 +02:00
Clément Lassieur 36f666c63d
tests: ssh: Add a test for SFTP.
* gnu/tests/ssh.scm (run-ssh-test): Introduce "SFTP file writing and reading".
Make 'sftp?' a keyword parameter.
(%test-openssh): Pass #:sftp? #t to 'run-ssh-test'.
2017-03-21 20:49:26 +01:00
Clément Lassieur cfaf4d1165
tests: ssh: Abstract session connection and authentication.
* gnu/tests/ssh.scm (run-ssh-test): Introduce make-session-for-test,
call-with-connected-session and call-with-connected-session/auth.
(run-ssh-test)["connect"]: Rename to "shell command".  Abstract its session
connection and authentication work into the above three functions.
2017-03-21 20:49:26 +01:00
Ludovic Courtès 2b4363891c
tests: ssh: Add Dropbear test.
* gnu/tests/ssh.scm (run-ssh-test): Try authenticating with
'userauth-none!' when 'userauth-password!' fails.
(%test-dropbear): New variable.
2016-10-03 15:18:51 +02:00
Ludovic Courtès 0e59885060
tests: ssh: Generalize.
* gnu/tests/ssh.scm (%openssh-os): Rename to...
(%base-os): ... this.
[services]: Remove 'openssh-service-type' instance.
(os-with-service): New procedure.
(run-openssh-test): Rename to...
(run-ssh-test): ... this.  Add 'ssh-service' and 'pid-file' parameters.
Use 'os-with-service' to add SSH-SERVICE to %BASE-OS.  Honor PID-FILE.
(%test-openssh): Adjust accordingly.
2016-10-03 15:18:28 +02:00
Ludovic Courtès d5b0c9024e
tests: Add 'openssh-service-type' test.
* gnu/tests/ssh.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
2016-10-03 00:38:28 +02:00