Test::NoTty - faking successful failure

by Nicholas Clark (London.pm)

Test::NoTty - faking successful failure aimed at Any. This talk starts on 2023-02-27 at 15:45 for 20 minutes. It takes place at the Room 1.

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

Interest in attending: