(t *testing.T)
| 147 | } |
| 148 | |
| 149 | func TestReadPasswordFromFile(t *testing.T) { |
| 150 | content := []byte("my-password-on-file\n") |
| 151 | f, cleanup := newFile(t, content) |
| 152 | defer cleanup() |
| 153 | |
| 154 | b, err := ReadPasswordFromFile(f.Name()) |
| 155 | require.NoError(t, err) |
| 156 | require.True(t, bytes.Equal([]byte("my-password-on-file"), b), "expected %s to equal %s", b, content) |
| 157 | } |
| 158 | |
| 159 | func TestStringReadPasswordFromFile(t *testing.T) { |
| 160 | content := []byte("my-password-on-file\n") |
nothing calls this directly
no test coverage detected
searching dependent graphs…