testCloser is a helper to fail the test if a Closer fails to close.
(t *testing.T, closer io.Closer)
| 951 | |
| 952 | // testCloser is a helper to fail the test if a Closer fails to close. |
| 953 | func testCloser(t *testing.T, closer io.Closer) { |
| 954 | t.Helper() |
| 955 | if err := closer.Close(); err != nil { |
| 956 | t.Errorf("Close failed: %s", err) |
| 957 | } |
| 958 | } |
| 959 | |
| 960 | // waitForEchoDisabled polls the TTY until echo mode is disabled or the |
| 961 | // timeout is reached. This is used in password and auth token tests to |
no test coverage detected