Commit 53729841 authored by Yarny0's avatar Yarny0
Browse files

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.
parent d7705c01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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}")