From 53729841e871a8604399dd003ce5a57491158eed Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Fri, 20 Jan 2023 21:25:19 +0100 Subject: [PATCH] nixos/tests/cups-pdf: fix test with socket-activated cups The cups-pdf vm test previously waited for the activation of `cups.service` before testing anything. This method fails since https://github.com/NixOS/nixpkgs/commit/47d9e7d3d7d8ad19e29be1445171726bf7d602b6 as cups auto-stops if it is not used, causing the test framework to complain that `cups.service` will never start. The commit at hand alters the test so it simply waits for `multi-user.target`. We could also switch to `cups.socket`, but `multi-user.target` seems to be more robust concerning future changes in the cups mechanisms. --- nixos/tests/cups-pdf.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/cups-pdf.nix b/nixos/tests/cups-pdf.nix index 70d14f29e2e5..957b0296a755 100644 --- a/nixos/tests/cups-pdf.nix +++ b/nixos/tests/cups-pdf.nix @@ -23,7 +23,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { testScript = '' from subprocess import run - machine.wait_for_unit("cups.service") + machine.wait_for_unit("multi-user.target") for name in ("opt", "noopt"): text = f"test text {name}".upper() machine.wait_until_succeeds(f"lpstat -v {name}")