1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

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.
This commit is contained in:
Alyssa Ross 2023-05-27 12:56:04 +00:00
parent a367e2ba0a
commit 845576aac4
No known key found for this signature in database
GPG key ID: F9DBED4859B271C0

View file

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