3
0
Fork 0
forked from mirrors/nixpkgs

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

47d9e7d3d7

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.
This commit is contained in:
Yarny0 2023-01-20 21:25:19 +01:00
parent d7705c01ef
commit 53729841e8

View file

@ -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}")