(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestProfileResolveInteractiveError(t *testing.T) { |
| 77 | is := is.New(t) |
| 78 | |
| 79 | cfg := &storageMock{ |
| 80 | LenFunc: func() int { |
| 81 | return 1 |
| 82 | }, |
| 83 | NamesFunc: func() []string { |
| 84 | return []string{"work"} |
| 85 | }, |
| 86 | } |
| 87 | |
| 88 | _, err := profileResolve( |
| 89 | nil, |
| 90 | &bytes.Buffer{}, |
| 91 | &bytes.Buffer{}, |
| 92 | cfg, |
| 93 | func(_ []string, _ io.Reader, _ io.Writer) (string, error) { |
| 94 | return "", fmt.Errorf("boom") |
| 95 | }, |
| 96 | ) |
| 97 | |
| 98 | is.True(err != nil) |
| 99 | is.Equal(err.Error(), "Unable to select a profile: boom") |
| 100 | } |
nothing calls this directly
no test coverage detected