From 845576aac4c067b816886d5ef55aaec82ea37c17 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 27 May 2023 12:56:04 +0000 Subject: [PATCH] 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. --- nixos/lib/test-driver/test_driver/driver.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nixos/lib/test-driver/test_driver/driver.py b/nixos/lib/test-driver/test_driver/driver.py index ea6ba4b65b56..835d60ec3b4f 100644 --- a/nixos/lib/test-driver/test_driver/driver.py +++ b/nixos/lib/test-driver/test_driver/driver.py @@ -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"):