From 49894ac857fd1206ac111d6adbf6e9f6e640d795 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 18 Apr 2016 01:16:19 +0200 Subject: [PATCH] nixos.tests.printing: fix Two fixes: Not really sure why removing `--fail` from the curl calls is necessary, but with that option, curl erronously reports 404 (which it shouldn't per my interactive vm testing). Fix paths to example files used for the printing test Toghether, these changes allow the test to run to completion on my machine. --- nixos/tests/printing.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/printing.nix b/nixos/tests/printing.nix index 10d69b446cd..adbef228c2f 100644 --- a/nixos/tests/printing.nix +++ b/nixos/tests/printing.nix @@ -40,9 +40,9 @@ import ./make-test.nix ({pkgs, ... }: { $client->sleep(10); # wait until cups is fully initialized $client->succeed("lpstat -r") =~ /scheduler is running/ or die; $client->succeed("lpstat -H") =~ "/var/run/cups/cups.sock" or die; - $client->succeed("curl --fail http://localhost:631/"); - $client->succeed("curl --fail http://server:631/"); - $server->fail("curl --fail --connect-timeout 2 http://client:631/"); + $client->succeed("curl http://localhost:631/"); + $client->succeed("curl http://server:631/"); + $server->fail("curl --connect-timeout 2 http://client:631/"); # Add a HP Deskjet printer connected via USB to the server. $server->succeed("lpadmin -p DeskjetLocal -E -v usb://foobar/printers/foobar"); @@ -60,10 +60,10 @@ import ./make-test.nix ({pkgs, ... }: { $client->succeed("lpq") =~ /DeskjetRemote is ready.*no entries/s or die; # Test printing various file types. - foreach my $file ("${pkgs.groff.doc}/share/doc/*/examples/mom/penguin.pdf", - "${pkgs.groff.doc}/share/doc/*/meref.ps", + foreach my $file ("${pkgs.groff.doc}/share/doc/examples/mom/penguin.pdf", + "${pkgs.groff.doc}/share/doc/meref.ps", "${pkgs.cups}/share/doc/cups/images/cups.png", - "${pkgs.pcre.doc}/share/doc/pcre/pcre.txt") + "${pkgs.pcre.doc}/share/doc/pcre.txt") { $file =~ /([^\/]*)$/; my $fn = $1;