Unverified Commit 845576aa authored by Alyssa Ross's avatar Alyssa Ross
Browse files

nixos/test-driver: undeprecate create_machine

This warning was added a year and a half ago, but still no test in
NixOS directly instantiates the machine class, presumably because it's
not actually possible for a test to do so without losing
functionality.  For example, there's no way for a NixOS test to access
the output directory that create_machine passes to the Machine
constructor.

This warning is therefore just contributing to alert fatigue for
users, who are unable to follow its advice.  Once it's actually
possible to do what it suggests, the warning can be reintroduced.
parent a367e2ba
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -163,11 +163,6 @@ class Driver:
                machine.wait_for_shutdown()

    def create_machine(self, args: Dict[str, Any]) -> Machine:
        rootlog.warning(
            "Using legacy create_machine(), please instantiate the"
            "Machine class directly, instead"
        )

        tmp_dir = get_tmp_dir()

        if args.get("startCommand"):