Open chengxiang1997 opened 1 week ago
This is not an issue with this project itself, but with the fact that you are trying to run a command that requires interaction with the end user to confirm next steps.
This is a common situation when you try to run commands remotely (such as pytest-testinfra
does) since they use non-interactive shell (as everything is run programmatically).
To solve this, you may need to explore ways to force the command to be executed without asking you for confirmation. E.g. some commands provide the -y option to auto-approve operations.
You may consult the man page of mkfs to see which option suites your needs: https://linux.die.net/man/8/mkfs.ext4 (maybe the -F
opt)
Some commands require further input after sending remote commands. What can I do if I'm using TestInfra? For example, when I input mkfs.ext4 /dev/sdb, it prompts the following content:
If I want to further input y through a Python script, how can I do that?"