From 9469433e341f7337308468bb4b9ccfff84b2951b Mon Sep 17 00:00:00 2001 From: Patrick Hilhorst Date: Wed, 2 Jun 2021 14:49:59 +0200 Subject: [PATCH] nixos/tests/test-driver: document shell_interact --- nixos/doc/manual/development/writing-nixos-tests.xml | 11 +++++++++++ nixos/lib/test-driver/test-driver.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml index 5a95436915fa..c29f2b01064c 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.xml +++ b/nixos/doc/manual/development/writing-nixos-tests.xml @@ -436,6 +436,17 @@ machine.systemctl("list-jobs --no-pager", "any-user") # spawns a shell for `any- + + + shell_interact + + + + Allows you to directly interact with the guest shell. + This should only be used during test development, not in production tests. + + + diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 90ae2e558ef5..6669c914f76e 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -459,7 +459,7 @@ class Machine: def shell_interact(self) -> None: """Allows you to interact with the guest shell - Should only be used during testing, not in the production test.""" + Should only be used during test development, not in the production test.""" self.connect() telnet = telnetlib.Telnet() telnet.sock = self.shell # type: ignore