From 9c1c424e525b637560d91b99430b83cdaed24820 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 23 Feb 2018 13:41:15 +0300 Subject: cups service: fix client sockets Use systemd to create the directory for UNIX socket. Also use localhost instead of 127.0.0.1 as is done in default cupsd.conf so that IPv6 is enabled when available. --- nixos/tests/printing.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nixos/tests/printing.nix') diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix index 2d3ecaf94cfa..989008830613 100644 --- a/nixos/tests/printing.nix +++ b/nixos/tests/printing.nix @@ -39,7 +39,9 @@ import ./make-test.nix ({pkgs, ... }: { $client->waitForUnit("cups.service"); $client->sleep(10); # wait until cups is fully initialized $client->succeed("lpstat -r") =~ /scheduler is running/ or die; - $client->succeed("lpstat -H") =~ "localhost:631" or die; + # Test that UNIX socket is used for connections. + $client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die; + # Test that HTTP server is available too. $client->succeed("curl --fail http://localhost:631/"); $client->succeed("curl --fail http://server:631/"); $server->fail("curl --fail --connect-timeout 2 http://client:631/"); -- cgit 1.4.1