| 121 | } |
| 122 | |
| 123 | func TestRunRequiresPassword(t *testing.T) { |
| 124 | targetPath := filepath.Join(t.TempDir(), "config.yml") |
| 125 | |
| 126 | _, err := Run(Options{ |
| 127 | TargetPath: targetPath, |
| 128 | Prompts: &fakePrompts{ |
| 129 | lines: []string{"user@example.com", "", ""}, |
| 130 | password: " ", |
| 131 | }, |
| 132 | }) |
| 133 | require.Error(t, err) |
| 134 | assert.Contains(t, err.Error(), "password is required") |
| 135 | assert.NoFileExists(t, targetPath) |
| 136 | } |
| 137 | |
| 138 | func TestRunRejectsInvalidProxy(t *testing.T) { |
| 139 | targetPath := filepath.Join(t.TempDir(), "config.yml") |