tests: add fake_sudo to sshd fixture
This allows to use the same code for both testing and real-world.
This commit is contained in:
@@ -63,7 +63,7 @@ def upload(
|
||||
tar.addfile(tarinfo, f)
|
||||
|
||||
sudo = ""
|
||||
if host.user != "root" and os.environ.get("IN_PYTEST") is None:
|
||||
if host.user != "root":
|
||||
sudo = "sudo -- "
|
||||
|
||||
cmd = "rm -rf $0 && mkdir -m $1 -p $0 && tar -C $0 -xzf -"
|
||||
|
||||
Reference in New Issue
Block a user