Test::NoTty - faking successful failure

von Nicholas Clark (London.pm)

Test::NoTty - faking successful failure richtet sich an Alle. Der Talk beginnt am 27.02.2023 um 15:45 Uhr und dauert 20 Minuten. Er findet im Raum 1 statt.

ssh clients, database clients and similar can prompt you to enter a sensitive password from the terminal. That way, it's never exposed on the command line or in a configuration file on disk.

At work, we wanted the option to do this with our database wrapper if there is a terminal, but if there isn't, fail fast and loud, rather than hanging forever.

We needed tests for both scenarios, but when we write tests we're doing so interactively - how do we test the tests?

Hence Test::NoTtty - a helper to "run this block of code as if it's non-interactive", so we can successfully fail anywhere.


Tags: database prompting terminal testing tty

Teilnahmeinteresse: