pytest-dev / pytest-testinfra

Testinfra test your infrastructures
https://testinfra.readthedocs.io
Apache License 2.0
2.37k stars 355 forks source link

testinfra/modules/blockdevice: Don't fail on stderr #745

Closed BenoitKnecht closed 10 months ago

BenoitKnecht commented 11 months ago

The blockdevice module raises a RuntimeError if blockdev returns with a non-zero exit code, or if stderr is not empty.

But the latter can happen even when there's no failure at all, for instance if sshd has a banner message configured (which gets output to stderr whenever someone connects to the host).

philpep commented 10 months ago

Merged, thanks!